In the query below I extract data from 3 tables. Each table has an 'aOwner'
attribute which relates to a user ID in my 'users' table. I would like to be
able to extract the username from my 'users' table based upon this id. Is it
possible to join the results of this query with my users table so that the
username is included as a column in my results?
(
SELECT 'artist' AS artists, aName, aOwner, aDate
FROM artists
WHERE status = '0'
)
UNION (
SELECT 'album' AS albums, abName, aOwner, aDate
FROM albums
WHERE status = '0'
)
UNION (
SELECT 'event' AS
EVENTS , Description, aOwner, aDate
FROM events
WHERE status = '0'
)
ORDER BY aDate DESC