From the following table, write a SQL query to find the maximum order (purchase) amount for each customer. The customer ID should be in the range 3002 and 3007
- برمجة سي كيو ال sql
- 2021-09-01
- mhanasmh00489829403
الأجوبة
SELECT customer_id,MAX(purch_amt)
FROM orders
WHERE customer_id BETWEEN 3002 and 3007
GROUP BY customer_id
HAVING MAX(purch_amt)>1000;
Output of the Query:
customer_id max 3002 5760.00 3007 2400.60 3004 1983.43
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال