test=*# select * from halloppp ;
entwickler | produkt
------------+---------
1 | 1
1 | 2
1 | 3
1 | 4
1 | 5
2 | 6
2 | 7
2 | 8
3 | 9
3 | 10
(10 Zeilen)
test=*# select entwickler, count(produkt) from halloppp group by entwickler;
entwickler | count
------------+-------
1 | 5
3 | 2
2 | 3
(3 Zeilen)
test=*# select entwickler, count(produkt) from halloppp group by entwickler having count(produkt) >= 5;
entwickler | count
------------+-------
1 | 5
(1 Zeile)
test=*#