SELECT
    t.id,
    t.shipped,
    t.nickname
FROM invoiceOut io 
    JOIN ticket t ON t.refFk = io.ref
WHERE io.id = ?
ORDER BY t.shipped