Re: [SQL] Help on a complex query (avg data for day of the week)

2005-12-21 Thread Matthew Smith
Michael, Thanks heaps for that! Cheers, Matt Smith On Thu, 22 Dec 2005 01:37 pm, Michael Fuhr wrote: > On Thu, Dec 22, 2005 at 11:59:24AM +1100, Matthew Smith wrote: > > Sadly I am using 7.3, it seems that generate_series() is 8.0 and later. > > Yes, but it's easily wri

Re: [SQL] Help on a complex query (avg data for day of the week)

2005-12-21 Thread Matthew Smith
Richard (and list), Thanks for the help! More below: On Wed, 21 Dec 2005 09:04 pm, Richard Huxton wrote: > Matthew Smith wrote: > > I want to form a query that returns the average total usage for each day > > of the week, eg: > > [snip] > > > To get this info,

[SQL] Help on a complex query (avg data for day of the week)

2005-12-20 Thread Matthew Smith
nt it to be the sum of the 2 days divided by 2: (101994539 + 0)/2. Is there a better way to do this? Or does anyone have any suggestions on the best way to insert the missing dates into my query? Any help would be great! Thanks, Matthew Smith ---(end of broadcast)---