Is this what you are looking for?
select b.root, b.description, sum(a.cnt), a.entered_date
FROM
(select TICKETID,count(*) cnt, ENTERED as entered_date
from TICKET
group by ticketid) a,
(select id, description, cat_level,connect_by_root description root from ticket_category_tmp connect by prior id=parent_cat_code) b
WHERE a.TICKETID=b.id and b.cat_level<=1
GROUP BY root, description
Order By root
Main Topics
Browse All Topics





by: Omega002Posted on 2006-06-02 at 12:47:51ID: 16819680
This is how I would like the query to look once executed:
root description sum(a.cnt) entered
------- -------------- ------------- -----------
Admin Server Down 2 01/1/2006
Admin Exchange Down 1 01/2/2006
right now it does this:
root description sum(a.cnt)
------- -------------- -------------
Admin Server Down 2
Admin Exchange Down 1
PS. the entered field is in the ticket table.