I have two tables, CLIENTS and SALES. I would like to know which clients have no sales, and I store the customer ID in the sales table.
I tried this but to no avail:
SELECT *
FROM cliente
RIGHT JOIN vendas ON (vendas.id_cliente = cliente.id)
WHERE vendas.id_cliente IS NULL