I have a bunch of data in several tables. Each row has a ts
column that is a data type TIMESTAMP, looks like this:
2013-11-20 11:20:14
I'd like to produce counts for each week of the year to plot a graph. So the results I'd like are like this:
week1 5
week2 16
week3 19
week4 27
For example. Is it possible to do this with SQL? I mean I could manually do it with a PHP script but I feel like there must be a way to use the COUNT() function in SQL to do this.