Can HQL Select on the result set of another query? For example:
SELECT COUNT(*) FROM (SELECT * FROM Table)
I can do it in SQL but w
Using subquery as you desire is not possible. One way is using a distinct this way:
SELECT COUNT(DISTINCT t.id) FROM table t INNER JOIN t.list l WHERE t.status = 'ST1' AND l.status = 'ST2'"
I used the inner join to express a select repetition