SELECT

 U.FULL_NAME AS SUBMITTER,

COUNT(*) AS CLOSED_TICKETS

FROM HD_TICKET H,
HD_STATUS S,
USER U
WHERE H.HD_STATUS_ID = S.ID
AND U.ID = H.SUBMITTER_ID
AND S.STATE = 'CLOSED'
GROUP BY U.FULL_NAME
ORDER BY U.FULL_NAME

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
select ifnull((select FULL_NAME from USER where T.OWNER_ID = USER.ID),' Unassigned') as 'Owner Name', count(*) as 'Total Open Tickets', U.LOCATION
from HD_TICKET T
left join USER U on U.ID = T.OWNER_ID
left join HD_STATUS S on S.ID = T.HD_STATUS_ID
where S.NAME not rlike 'Closed|Resolved'
group by T.OWNER_ID
order by count(*)
Answered 02/24/2015 by: h2opolo25
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity