Hi SteveTroy,
Can below query help me to get the desired result, in which i want to get count of ticket which were open and active two days ago , not sure if it is logically correct ?
Select CONCAT(cnt.last_name,', ' , cnt.first_name) as combo_name, category_symbol,
sum (case when (cr.open_date > PdmAddDays (-3) and active = 1) and ((cr.resolve_date = PdmAddDays (-2) and cr.open_date > PdmAddDays (-3)) and (cr.resolve_date = PdmAddDays (-1) and cr.open_date > PdmAddDays (-3) ) ) then 1 else 0 end) as T1
from cr
inner join cnt on cr.assignee_userid = cnt.userid
WHERE cr.open_date >PdmAddDays(-60) and cr.type = 'I'
and cnt.userid = cr.assignee_userid
group by cnt.last_name,cnt.first_name,category_symbol