Page 1 of 1

how to get weeks average price ?

Posted: Tue Jul 15, 2008 6:56 am
by djdon11
Hello All

Well i need a solution or any logic for my query.

I have one start date and one end date. now i have to count the weeks among these days and i have to show a product's average price for each week. this start and date can be of anytime. and also the week count should be specific for week only means if date started from 19th of jan and the 21st jan is a weekend then this slot of time should count as 1 week.

Can anybody help me on this

Thanks

Re: how to get weeks average price ?

Posted: Tue Jul 15, 2008 6:59 am
by VladSun
You'll need to group by WEEK() function :)
http://dev.mysql.com/doc/refman/5.0/en/ ... ction_week