Subquaries
Subquaries
SUBQUERIES
1. 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.
25. From the following tables write a SQL query to find those orders where
every order amount is less than the maximum order amount of a customer
who lives in London City. Return ord_no, purch_amt, ord_date, customer_id
and salesman_id.
33. From the following tables, write a SQL query to find the most expensive
product of each company. Return Product Name, Price and Company.