I want to make a query that returns a table of tickets, including the email address of each ticket's owner. What do I use in my query to retrieve that?
You can cross-reference from the tickets table to the person table using:
SELECT tickets.id, tickets.subject, tickets.date_created, tickets.person.primary_email.email
WHERE tickets.date_created >= '2014-01-08'
which would give you a table like this:
|526||Problem with tiger||Wed, 8th Jan 2014 12:21 email@example.com|
Add a comment
Please log in or register to submit a comment.