SELECT t.id, date, a.Agencia, note, p.name province,
zip_code, city, c.name, consignee, invoice
FROM ticket_view t
JOIN address_view c ON t.address_id = c.id
JOIN vn2008.Agencias a ON t.agency_id = a.Id_Agencia
JOIN vn2008.province p ON c.province_id = p.province_id
WHERE t.id = #ticket