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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -