Tenho um select que exibe os nomes, data e valores pagos por clientes. Devo fazer exibir uma lista sem repetir os nomes.
SELECT
c.name,
p.created_at,
p.amount_paid
FROM
receipts as r,
payments as p,
payment_status as ps,
receipt_status as rs,
clients as c
WHERE
ps.id = p.payment_status_id AND
p.created_at < CURRENT_DATE AND p.created_at > CURRENT_DATE -199