MYSQL Select and group by date
Posted
by Gil
on Stack Overflow
See other posts from Stack Overflow
or by Gil
Published on 2010-04-06T02:13:14Z
Indexed on
2010/04/06
2:23 UTC
Read the original article
Hit count: 398
I'm not sure how create a right query to get the result I'm looking for. What I have is 2 tables. first has ID, Name columns and second has date and adminID, which is referenced from table 1 column ID. Now, what I want to get is basically number of times each admin loged in per day during the month. From structure like this one I want to get per day and month data so result would be similar to 1, 2, 2 march total 5 for admin 4.
ID | Date
------------------
4 | 2010/03/01
4 | 2010/03/04
4 | 2010/03/04
4 | 2010/03/05
4 | 2010/03/05
© Stack Overflow or respective owner