> should do the trick without double select, or?
Indeed it seems to do so. The cost estimation is even about 10 times less
with the real application's queries.
I never really used group/having even though being aware of their existence.
I probably should do so more often.