I'm having trouble building the correct syntax select statement for a system to handle support tickets.
The table "tickets" has the following columns:
The id is unique for each record but the ticket_id is generated to group a set of support records together. For example, there may be five communications back and forth between admin and customer and so those five records have unique record ids but the same ticket_id since they are associated with the same initital support issue.
What I need to do is obtain all fields from the most recent record in each "ticket_id" group.
So if there are three groups "issue1" "issue2" and "issue3" and they all have five records each, I need to display the most recent record for "issue1" and "issue2" and "issue3" as follows:
Ticket ID Date Category Status
issue1 10/10/08 Technical Question Open
issue2 10/09/08 Billing Question Resolved
issue3 10/07/08 General Question Updated
Can anyone point me in the right direction?