Assignment SQL Lab2
Assignment SQL Lab2
table: salesman
table: customer
Table: orders
COM_ID COM_NAME
------ -------------
11 Samsung
12 iBall
13 Epsion
14 Zebronics
15 Asus
16 Frontech
Table: item_mast
Table: emp_department
Table: emp_details
1. Write a SQL statement to prepare a list with salesman name, customer name and their cities for
the salesmen and customer who belongs to the same city.
2. 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.
3. Write a SQL statement to know which salesman are working for which customer.
4. Write a SQL statement to find the list of customers who appointed a salesman for their jobs who
gets a commission from the company is more than 12%.
5. Write a SQL statement to find the list of customers who appointed a salesman for their jobs who
does not live in the same city where their customer lives, and gets a commission is above 12% .