Sub Queries
Sub Queries
From the following tables, write a SQL query to find all the orders
issued by the salesman 'Paul Adam'. Return ord_no, purch_amt,
ord_date, customer_id and salesman_id.
2. From the following tables write a SQL query to find all orders generated
by London-based salespeople. Return ord_no, purch_amt, ord_date,
customer_id, salesman_id.
3. From the following tables write a SQL query to find all orders generated
by the salespeople who may work for customers whose id is 3007.
Return ord_no, purch_amt, ord_date, customer_id, salesman_id.
4. From the following tables write a SQL query to find the order values
greater than the average order value of 10th October 2012. Return
ord_no, purch_amt, ord_date, customer_id, salesman_id.
5. to find those salespeople who earned the maximum commission.
Return ord_no, purch_amt, ord_date, and salesman_id.