SELECT t.*, ot.serial_number as ot_serial, pt.serial_number as pt_serial
, ou.username originator_name
, pu.username partner_name
FROM TRADES t
left join TAGS ot on ot.tag_id = t.originator_tag_id
left join TAGS pt on pt.tag_id = t.partner_tag_id
left join USERS ou on ou.user_id = t.originator_user_id
left join USERS pu on pu.user_id = t.partner_user_id
|