Question : SQL query to extract distinct years and number of members within a year

Hi All

I need a view in my SQL DB from one single table where I can show 2 columns:

1: Number of different birthyears
2: Number of members within a single year

And as I said - all in a single view with 2 colums.

Answer : SQL query to extract distinct years and number of members within a year

select year(birthdate), count(*)
from members
group by year(birthdate)
Random Solutions  
 
programming4us programming4us