Record in my mysql database
id camper_id reg_date
1 3 2017-04-17 00:00:00
2 3 2017-04-18 00:00:00
3 4 2017-04-15 00:00:00
4 4 2017-04-13 00:00:00
SELECT COUNT(*),camper_id,reg_date FROM tbl_registration GROUP BY camper_id HAVING reg_date >= CURDATE()
lets say today or CURDATE is 2017-04-15 00:00:00
I am getting the wrong result This is what I get when I run the query
COUNT(*) campr_id reg_date
2 3 2017-04-15 00:00:00
2 4 2017-04-18 00:00:00
I should be getting..
COUNT(*) camper_id reg_date
2 3 2017-04-15 00:00:00
1 4 2017-04-18 00:00:00
what is wrong with my query ?