0% found this document useful (0 votes)
27 views5 pages

Assignment 24

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views5 pages

Assignment 24

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Program 4.

6
Joins
1. Create table customer, salesman and order with following entries:
2. Find the salesperson and customer who belongs to same city. Return Salesman, cust_name
and city.

3. Find those orders where order amount exists between 500 and 2000. Return ord_no,
purch_amt, cust_name, city.
4. Find the salesperson(s) and the customer(s) he handles. Return Customer Name, city,
Salesman, commission.

5. Find those salespersons who received a commission from the company more than 12%.
Return Customer Name, customer city, Salesman, commission.

6. Find those salespersons do not live in the same city where their customers live and
received a commission from the company more than 12%.
7. Find the details of an order. Return ord_no, ord_date, purch_amt, Customer Name, grade,
Salesman, commission.

8. Find those customers whose grade less than 300. Return cust_name, customer city, grade,
Salesman, salesman city. The result should be ordered by ascending customer_id.

You might also like