Good evening, I'm using the following command:
select
cliente_id,
desconto,
pedidos_detalhes.pedido_id,
cliente_tipo
from
pedidos_detalhes
inner join
pedidos on pedidos_detalhes.pedido_id = pedidos.pedido_id;
The result is this:
How do I get the 10 customers who got the highest discounts per order, without the same discount amount being repeated.
Thank you very much ...