programming-examples/sql/AggregateFunctions/Write a SQL statement to find the highest purchase amount ordered by the each customer on a particular date with their ID, order date and highest purchase amount.sql

5 lines
264 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*Write a SQL statement to find the highest purchase amount ordered by the each customer on a particular
date with their ID, order date and highest purchase amount.*/
SELECT customer_id,ord_date,MAX(purch_amt)
FROM orders
GROUP BY customer_id,ord_date;