I have a column in a MySQL table called year.
I want to check how many rows I have for each DISTINCT year.
This:
SELECT DISTINCT year FROM `table`
Gets each year, but how do I hook each year inside of a COUNT statement? Do I have to use a nested query?
1 Answer