I have a table A with columns x, y and z. I want to make a query to count the rows where (Ax = 1 and Ay = 4), (Ax = 2 and Ay = 7) and (Ax = 3 and Ay = 3). The result should consist of 3 integers matching the above criteria.
I do not know if such a request is possible.
I need sample code in JPA criteria (preferably) or JPQL or, in the worst case, SQL.
source share