Try This....
select t1.ID,t1.Ticket_ID,t1.inserted as 'Date',t1.Category,t1.Status from ticket t1
inner join
(select t2.Ticket_id,Max(ID) as ID from ticket t2
group by t2.Ticket_ID
)total
on t1.ID=total.ID
:- Varma
We are Happy to inform launch of a new site with loads of database related information Site offers wide range of functionality Forums,Blogs,Articles,Editorials and much more
http://www.sqllibrarian.info/