mysql - SQL group by DATENAME -


i'm trying count of rows each day of week between date.

so far have:

select datename(weekday,date) theday tablename year(date) = '2013' , (month(date) >= 5 , month(date) <= 7) 

this gives me this:

wednesday wednesday wednesday wednesday wednesday thursday thursday friday friday friday friday saturday saturday 

but i'd like

wednesday 

and in next column

5 

and on. know group by, i'm not great sql.

select datename(weekday,date) theday,count(*) numberofdays tablename  year(date) = '2013' , (month(date) >= 5 , month(date) <= 7) group datename(weekday,date) 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -