Considere os seguintes registros da tabela info, pertencente a um banco de dados MySQL:
| cod | name | id | stat |
| 77 | John | 303 | S |
| 88 | Marie | 303 | N |
| 77 | John | 200 | N |
| 88 | Raul | 220 | S |
| 99 | Artur | 220 | S |
| 00 | Bob | 400 | S |
Ao aplicar o comando: SELECT stat, count (distinct id) as b from INFO GROUP BY STAT HAVING b >= 3, retornará como resultado: