Grouping MySQL data by which day of the week it is -
i'm attempting separate database entries number of entries fall on each day of week (mon=43, tue=35...) no regard month or year. result query below return 8 results instead of 7 , number of results each day incorrect.
select count(*) table group dayofweek(date)
example of table:
date 07/11/13 07/16/13 07/17/13 07/24/13 07/26/13 07/26/13
am using dayofweek correctly?
i suggest change query follow:
select dayofweek(date), count(*) table group dayofweek(date)
so can better understand if there's wrong, anyway: yes you're using dayofweek correctly. bit surprised fact 8 results... can show results please?
gnagno
Comments
Post a Comment