Reputation: 7
i have a mysql table which contains
id,(primary key)
user_id,
**number**,
date
columns.I want a query which select count number for same date and same user_id.
for example,date column have 3 entries of 09/07/2014,then i want a query which return count 3.
my where condition contains only user_id
SELECT number,date FROM play_history WHERE user_id =49
Thanks
Upvotes: 0
Views: 75
Reputation: 204746
select `date`, count(`number`) as num_count
from play_history
where user_id = 49
group by `date`
Upvotes: 1