Answered step by step
Verified Expert Solution
Link Copied!

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. image text in transcribed

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.12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions