Igor Tandetnik wrote:
> 
> rixtertrader <r...@amazingaccuracy.com> wrote:
>> Here is the SQL string I'm currently using that has this problem:
>> 
>> SELECT date(max(Date), 'weekday 5') as MaxDate, Date, Year, Month, Week,
>> Max(High) as High, Min(Low) as Low, Week as WeekNum FROM [" & sTable & "]
>> GROUP By Year, Week
> 
> Try
> 
> GROUP BY Year + (WeekNum=53), WeekNum  - (WeekNum=53)*52
> 
> This should effectively merge week 53 with week 1 of next year.
> -- 
> Igor Tandetnik
> 
> _______________________________________________
> 


That was absolutely brilliant. Thank you.

I don't understand how it works. I'm sure some of that has to do with the
fact that I'm a 1 out of 10 when it comes to understanding SQL, and I wrote
this so long ago. 

I don't suppose this can be explained to me in a dumbed-down sort of way. 
:-/


-- 
View this message in context: 
http://old.nabble.com/Converting-Daily-to-Weekly-tp33252969p33255272.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to