Hi,

I have a query like this , I want the count basing on two condition :
With < 50 and >50 .

I have written the query like this for <50 which is working fine , how can I get those value with condition >50

select m.empcode, p.courtaction,b.benchname,(count(*)*b.points)
from main m ,proceedings p ,benchcategory b
WHERE P.MAINCASE.SIDE = M.SIDE AND
P.MAINCASE.CASETYPE = M.CASETYPE AND
P.MAINCASE.CASENUMBER = M.CASENUMBER AND
P.MAINCASE.CASEYEAR = M.CASEYEAR AND
P.COURTACTION !=2 and
m.benchcategory = b.benchcode and
m.empcode = m.empcode and
p.courtaction <50
group by m.empcode,p.courtaction,b.benchname,b.points


condition with p.courtaction < 50

returns
4 rows

condition with p.courtaction >50

returns
1 row

I want a result like

empcode count count1
(<50) (>50)
10 1 0
20 0 0
30 1 0
40 1 0
70 0 1

Can anyone help me out . Its very Urgent..

Thanking you
Ramesh.M