Most expensive purchased product per user
Most expensive purchased product per user
In sales(id, user_id, product, amount, ts), for each user_id find the product with the highest purchase amount and that amount itself. Return columns user_id, top_product, max_amount, ordered by user_id ascending.
Exemplo de resposta esperada
| user_id | top_product | max_amount |
|---|---|---|
| 10 | Monitor | 300.00 |
| 20 | Laptop | 1200.00 |
Entre para ver seu histórico de envios
EntrarEntre para usar o AI Mentor
EntrarFocus radio
Paused · SomaFM · Fluid