if I want to make a query that gets the count of users grouping ages
to get the counts each year as alone :
select count(*)
from tbl_user
group by age
how can I make a custom group by so I can get ages in ranges for example …
like this example :
group by ages as 0-18 , 19-25 , 26-...
SUM 1 and CASE WHEN work in MS SQL Server, which version of SQL are you using?