Re: Obtain week number between years

2010-04-29 Thread Johan De Meersman
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

Re: Obtain week number between years

2010-04-29 Thread Baron Schwartz
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

RE: Obtain week number between years

2010-04-29 Thread Steven Staples
: 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