Without more specifics, like what product these tickets are in, or what you mean by queued (transferred, maybe?), all I can do it provide a best-guess, generic sample query.
Probably something like:
SELECT TICKET_ID, MIN(ID) FIRST_QUEUE FROM QUEUE_TABLE GROUP BY TICKET_ID
One way to use this is:
- Use the above query to create an Xtraction table, called QUEUE_LINK for this example
- Link the ticket table to this QUEUE_LINK table on the Ticket IDs (or whatever the common field is)
- Create an Xtraction table, called FIRST_QUEUE for this example, that points at the "queue" table
- Link the QUEUE_LINK table to the FIRST_QUEUE table on QUEUE_LINK.FIRST_QUEUE = FIRST_QUEUE.ID
I hope this generic solution answers your specific question.