6 lines
269 B
MySQL
6 lines
269 B
MySQL
|
/*Write a SQL statement to find the highest purchase amount with their ID, for only those customers whose ID is within
|
||
|
the range 3002 and 3007.*/
|
||
|
SELECT customer_id,MAX(purch_amt)
|
||
|
FROM orders
|
||
|
WHERE customer_id BETWEEN 3002 and 3007
|
||
|
GROUP BY customer_id;
|