MySQL Grouping of data

Posted by text on Stack Overflow See other posts from Stack Overflow or by text
Published on 2010-05-07T07:52:42Z Indexed on 2010/05/07 7:58 UTC
Read the original article Hit count: 95

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql