Thanks a lot to everyone who helped.
It's all good!
Special Thanks to William and Regina!
- William Rogge <William_Rogge_at_voltek.com> wrote:
> YES.
>
> column the_week noprint
> SELECT column_a, column_b,
> to_char(some_date_column,'YYWW') the_week, count(*),
> sum(column_c)
> from table_t
> WHERE some_date_column BETWEEN :start_date and
> :end_date
> group by to_char(some_date_column, 'YYWW')
>
>
> -----Original Message-----
> From: Viktor [SMTP:stant_98_at_yahoo.com]
> Sent: Tuesday, April 03, 2001 1:36 PM
> To: Multiple recipients of list ORACLE-L
> Subject: SQL Question
>
>
> Hello all,
>
> Can someone tell me whether or not there is a way
> do this in SQL?
> I want to select some data given a certain date
> range,i.e where some_date between start_date and
> end_date.
> Is there a way to group the output by week?
> In other words, something like:
>
> SELECT column_a, column_b, count(*),
> sum(column_c)
> FROM table_t
> WHERE some_date_column BETWEEN :start_date and
> :end_date
> GROUP BY ...?
>
> How this be grouped by week?
>
> Thanks a lot.
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Viktor
> INET: stant_98_at_yahoo.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: William Rogge
> INET: William_Rogge_at_voltek.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Viktor
INET: stant_98_at_yahoo.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Apr 03 2001 - 16:52:41 CDT