Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> 2 queries with one select :is it possible???
i have 2 select queries with different 'where and group by clauses'
i'd like only one select to obtain something like that: select
evt_code,to_char(EVT_COMPLETED,'mm'),C1,C2.....
Q1
select evt_code,to_char(EVT_COMPLETED,'mm'),count(*) C1
from T1
where EVT_COMPLETED between :begindate_param and :enddate_param
and status='C'
group by EVT_code, to_char(EVT_COMPLETED,'mm')
Q2
select evt_code,to_char(EVT_target,'mm'),count(*) C2
from T1
where EVT_target < :begindate_param
and status='A'
group by EVT_code, to_char(EVT_target,'mm')
is it possible with SQL? Received on Wed Sep 12 2001 - 10:49:32 CDT
![]() |
![]() |