SQL Exercises: Prepare a list with order no, purchase amount, customer name and their cities for those orders which order amount between 500 and 2000.
SQL JOINS : Exercise-2 with Solution
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.
Sample Solution :
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;
:Explanation :
Pictorial presentation :
Practice Online
Have another way to solve this solution? Contribute your code (and comments) through Disqus.