SELECT
r.id,
r.amountPaid,
r.amountUnpaid,
r.payed,
r.companyFk
FROM receipt r
JOIN client c ON c.id = r.clientFk
WHERE r.id = ?