Question: Consider the tables and write down SQL statements for the questions. 1 . Find the salesperson and customer who reside in the same city. Return
Consider the tables and write down SQL statements for the questions.
Find the salesperson and customer who reside in the same city. Return Salesman, custname and city.
Find those orders where the order amount exists between and Return ordno purchamt, custname, city.
Find the salespersons and the customers he represents. Return Customer Name, city, Salesman, commission.
Find salespeople who received commissions of more than percent from the company.
Write a SQL query to locate those salespeople who do not live in the same city where their customers live and have received a commission of more than from the company.
Find the details of an order. Return ordno orddate, purchamt, Customer Name, grade, Salesman, commission.
Display the customer name, customer city, grade, salesman, salesman city. The results should be sorted by ascending customerid
Find those customers with a grade less than Return custname, customer city, grade, Salesman, salesmancity. The result should be ordered by ascending customerid
Join all the three tables showing everything together.
Write a SQL statement to join the tables salesman, customer and orders so that the same column of each table appears once and only the relational rows are returned.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
