Gossamer Forum
Home : General : Databases and SQL :

How to write this SQL query

Quote Reply
How to write this SQL query
CUSTOMER
Name City IndustryType
Abernathy Construction Willow B
Amalgamated Housing Mernphis B
Manchester Lumber Manchester F
Tri-City Builders Memphis B

ORDERS
Number CustName SalespersonName Amount
100 Abernathy Construction Zenith 560
200 Abernathy Construction Jones 1800
300 Manchester Lumber Abel 480
400 Abernathy Construction Abel 2500
500 Abernathy Construction Murphy 6000
600 Tri-City Builders Abel 700
700 Manchester Lumber Jones 150
800 Abernathy Construction Abel 75000

SALESPERSON
Name PercentOfQuota Salary
Abel 63 132000
Baker 38 46200
Jones 26 49500
Kobad 27 39600
Murphy 42 55000
Zenith 59 129800

I have got the three tables above.
Would you help me to write a SQL query to show the names and PercentOfQuota of sales people who have an order with all cuatomers.
Thank you very much!


Smile
Quote Reply
Re: [frank2050] How to write this SQL query In reply to
Wrong forum Wink I've moved your post for you.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!