SELECT
t.id,
t.shipped,
c.code companyCode,
t.packages
FROM ticket t
JOIN company c ON c.id = t.companyFk
WHERE t.id = ?