Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help grouping results by week
I am using a query like this:
select TO_CHAR(msg_date,'WW')WEEK,count(*) MSGS from meccareport
where
MOC LIKE 'MEW017%'
AND (MS='C' OR MS='D' OR MS='H' OR MS='N' OR MS='P' OR MS='R' OR MS='V')
AND (MT='A' or MT='P' or MT='H')
AND msg_date > '3 jan 99'
group by TO_CHAR(msg_date,'WW')
to get results by week that look like this:
WEEK
MSGS
I really need the week column to be specific such as:
WEEK_BEGINNING MSGSJAN
In other words, by week ending, or week beginning. Is this possible?
tia,
Bob
Received on Thu Apr 08 1999 - 14:57:35 CDT