programming-examples/sql/AggregateFunctions/Write a SQL statement to find the highest purchase amount ordered by the each customer with their ID and highest purchase amount.sql
2019-11-18 14:05:53 +01:00

5 lines
214 B
SQL

/*Write a SQL statement to find the highest purchase amount ordered by the each
customer with their ID and highest purchase amount. */
SELECT customer_id,MAX(purch_amt)
FROM orders
GROUP BY customer_id;