Guys i m having a table in which i have gender and date columns as described.
now i wan to count both male n females registered in particular month,so how can i make my query for that.
mysql> select id,gender,entrydate from patient_master;
+----+--------+------------+
| id | gender | entrydate |
+----+--------+------------+
| 1 | Male | 2012-07-02 |
| 2 | Female | 2012-05-10 |
| 3 | Male | 2012-05-25 |
| 4 | Female | 2012-07-09 |
| 5 | Male | 2012-07-10 |
| 6 | Female | 2012-07-10 |
| 7 | Male | 2012-07-10 |
+----+--------+------------+
To get the results for all months:
If you want it for all months of a single year: