Answered step by step
Verified Expert Solution
Question
1 Approved Answer
From the following tables write a SQL query to find the salesperson(s) and the customer(s) he handle. Return Customer Name, city, Salesman, commission. Using joins
From the following tables write a SQL query to find the salesperson(s) and the customer(s) he handle. Return Customer Name, city, Salesman, commission.
Using joins and nested queries.
2. Sample table: customer customer_id cust_name city | grade salesman_id -+-------+---- 3002 | Asad isb | 1000 | 5001 3007 | atif isb | 1200 5001 3005 arham | lahore | 2500 5002 3008 Fatima | multan | 2300 5002 3004 Halema | karachi 3000 5006 3009 Sidra faisalabad 1800 5003 3003 | Zoya | larkana 2000 5007 3001 Hassan | rawalpindi | 2100 | 5005 Sample table: salesman salesman_id name city commission isb 5001 5002 5005 5006 5007 5003 Siraj | 0.15 | Sajjad | lahore 10.13 Mehran | multan 0.11 Qasim | lahore 0.14 Saud attock 0.13 sohaib jhelum 0.12Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started