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

Home -> Community -> Usenet -> c.d.o.misc -> Help grouping results by week

Help grouping results by week

From: Bob McConnell <bob.mcconnell_at_mci.com>
Date: Thu, 08 Apr 1999 19:57:35 GMT
Message-ID: <370D0AAE.930DA0F8@mci.com>


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




01
702
02
1025
03
574
04
583
05
1347
06
1143
07
891
08
852
09
827
10
943
11
580
12
1232
13
1731
14
325
14 rows selected.

I really need the week column to be specific such as:

WEEK_BEGINNING                                            MSGS
JAN
4
702
JAN
12
1025
etc.

In other words, by week ending, or week beginning. Is this possible?

tia,
Bob Received on Thu Apr 08 1999 - 14:57:35 CDT

Original text of this message

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