| MySQL | ||
|
We might want to count, or find the average by days of the week. This approach uses the date functions. In this example we note that top of the pops usually goes out on a Thursday or Friday. | ||
| Specific to MySQL | ||
| DAYOFWEEK gives 1 for Sunday, 2 for Monday,... 7 for Saturday. An alternative is to use WEEKDAY which gives 0 for Monday, ... 6 for Sunday. | ||