mysql> SELECT weekday, count(weekday) AS number FROM data WHERE type='x'
GROUP BY weekday ORDER BY weekday ASC;
+----------+--------+
| weekday | number |
+----------+--------+
| monday | 14 |
| thursday | 28 |
| friday | 44 |
| saturday | 13 |
+----------+--------+
4 rows in set (0.01 sec)
Is there any easy way also output weekdays where the number is 0 ?
Thanks
Robert
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php