grouping on range
Eg.
input
I have a table xx in which a column name is age having number . i want the output as shown below. i want the count of age in the range . pl suggest a sql query
table data :
age
21
23
25
26
29
31
33
32
output
range count
20-25 3
26-30 2
31-35 3
input
I have a table xx in which a column name is age having number . i want the output as shown below. i want the count of age in the range . pl suggest a sql query
table data :
age
21
23
25
26
29
31
33
32
output
range count
20-25 3
26-30 2
31-35 3
0