group by week(yourdate) ?
On Thu, Apr 29, 2010 at 2:12 PM, Tompkins Neil neil.tompk...@googlemail.com
wrote:
Hi
We need to produce a query to return the total number of user visits
between
two date ranges that span over two year e.g from 2009-04-29 to 2010-04-29.
My question is how can I
Neil,
I would start with something like this, assuming the date column is called d:
SELECT count, or sum, or whatever aggregate function
FROM table
GROUP BY d - INTERVAL DAYOFWEEK(d) DAY;
- Baron
On Thu, Apr 29, 2010 at 8:12 AM, Tompkins Neil
neil.tompk...@googlemail.com wrote:
Hi
We need
: Obtain week number between years
Neil,
I would start with something like this, assuming the date column is
called d:
SELECT count, or sum, or whatever aggregate function
FROM table
GROUP BY d - INTERVAL DAYOFWEEK(d) DAY;
- Baron
On Thu, Apr 29, 2010 at 8:12 AM, Tompkins Neil
neil.tompk