3 ms·
Yes, should be max(count). I've lost you with top3. # select * from (select count from (select count(y.i), y.d from y group by y.d) _ limit 2) b,
by sergeykish 6y ago
Yes, should be max(count). I've lost you with top3.
# select * from
(select count from (select count(y.i), y.d from y group by y.d) _ limit 2) b,
(select count(y.i), y.d from y group by y.d) a;
count | count | d
-------+-------+---
1 | 1 | 2
2 | 1 | 2
1 | 2 | 1
2 | 2 | 1
(4 rows)
- alquemist 6y agotop - max value in the group top3 - max 3 values in the group