Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Grouping data by week

Grouping data by week

From: <kcarlson_at_my-deja.com>
Date: 2000/08/03
Message-ID: <8mcq4d$gb0$1@nnrp1.deja.com>#1/1

I'm interested in writing a query that sums and reports data on a per-week basis, showing Monday's date for each week. It appears that I would need to use "group by to_char(my_date, 'WW')" for the grouping part, but how to specify the first day of the week in each output line?

Perhaps I could use something like
"to_date(to_char(my_date,'WW'),'MM/DD/YY')" but since it covers an entire week, which date would be consistently returned?

Thanks for any help,
Kevin Carlson

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Aug 03 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US