sorry to post it here.. i really need your attention..
thanx
hi guys! i am enim, i usually post thread in PHP and i guess its my first time here in mysql..
i have problem regarding the total count of the terminatecause..
i need the count of ANSWERED calls only and the total count of all calls..
can i do this in one query.. because my query below isn't working..
pls. help
thanx
enim :)
select destination, count(terminatecause) as tc CASE terminatecause
when 'ANSWER' then count(terminatecause)
end as allcall
from tblTable1
join tblTable2on tblTable1.someID = tblTable2.someID
join tblTable3on tblTable2.someID1 = tblTable3.someID1
where tblTable3.someID1= '1'
and tblTable1.someUser= 'user'
and tblTable1.callstarttime between '2008-08-01 00:00:00' and '2008-08-01 23:00:00'
group by destination, terminatecause order by destination asc