6 lines
268 B
SQL
6 lines
268 B
SQL
/*Write a SQL statement to find the highest purchase amount with their ID, for only those salesmen
|
|
whose ID is within the range 5003 and 5008.*/
|
|
SELECT salesman_id,MAX(purch_amt)
|
|
FROM orders
|
|
GROUP BY salesman_id
|
|
HAVING salesman_id BETWEEN 5003 AND 5008; |