I think there must be a bug in the date calculations.
Consider the following query
select extract(week from date('2010-12-31')), extract(week from date('2011-01-01')), extract(week from date('2011-01-03'))
Result:
date_part date_part date_part
52 52 1
Why is extract(week from date('2011-01-01')) not identified as week 1?
-- Ubold Hooper
Amplify Insight| 55 Washington St. Brooklyn, NY. 11201|Tel: 347-474-4829|Email: uhooper(at)amplify(dot)com<mailto:uhooper(at)amplify(dot)com>