MySQL
SELECT COUNT(DISTINCT column1, column2) FROM mytable;
ORACLE
SELECT COUNT(DISTINCT column1 || column2) FROM mytable;
I’ll check what is the syntax for Informix server.
JPA (Java Persistence API) do not support multiple columns in statements like these, so you should use createNativeQuery();