group by count sql examples Example: sql count group by SELECT gender, COUNT(*) FROM people GROUP BY gender;