By the way, if you want to include that "incomplete" week before 12/1 (incomplete because it doesn't have a data point
forMonday) then you would do this:<br /><br /><br />select s1.asx_code, s1.wdate AS date, s1.low , s1.high, s2.open,
s3.close,s1.volume<br />from (select asx_code, date_trunc('week', date) AS wdate, min(date) AS bdate, max(date) AS
edate,min(low) AS low, max(high) AS high, SUM(volume) AS volume<br /> from sales_summaries <br /> group by
asx_code,date_trunc('week', date)) s1, sales_summaries s2, sales_summaries s3<br />where s1.bdate = s2.date<br />and
s1.asx_code=s2.asx_code<br/>and s1.edate = s3.date<br />and s1.asx_code=s3.asx_code ;<br /><br /><br />