I want to group my data by Age and by gender: like this sample data:
Age: 1
Male: 2
Female: 3
Age 1 Total: 5
Age: 2
Male: 6
Female: 3
Age 2 Total: 9
How can I group the data according to age and count all the male and females in that age from mysql database?