programming-examples/sql/Joins/Write a SQL statement to make a list with order no, purchase amount, customer name and their cities for those orders which order amount between 500 and 2000.sql
2019-11-18 14:05:53 +01:00

7 lines
325 B
SQL

/*Write a SQL statement to make a list with order no, purchase amount, customer name and their cities for those orders which
order amount between 500 and 2000.*/
SELECT a.ord_no,a.purch_amt,
b.cust_name,b.city
FROM orders a,customer b
WHERE a.customer_id=b.customer_id
AND a.purch_amt BETWEEN 500 AND 2000;