Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql query
You beat me to it.
There is also the option for TRUNC() truncating the date to the quarter - which might be faster.
However, the format MIGHT be 'QQ', and there is the problem that the dates that Oracle thinks are the first of each quarter may not be the ones required by the poster.
Something like:
select trunc(date_col, 'QQ') , count(*)
from big_table
group by trunc(date_col, 'QQ')
;
should do it.
-- Jonathan Lewis http://www.jlcomp.demon.co.uk Next Seminars UK June / July Australia July / August http://www.jlcomp.demon.co.uk/seminar.html Sybrand Bakker wrote in message ...Received on Tue Jun 18 2002 - 15:58:59 CDT
>
>>
>IIRC the to_char function still support the Q format model, where q is
>for quarter.
>
>Hth
>
>Sybrand Bakker, Senior Oracle DBA
![]() |
![]() |