From the Salesman and Customer tables below, write SQL statements to do the following:  List the salesman id, rating and names of those salesmen who get rating from 3 to 5, sorted DESCENDING by rating. List all the customers’ information whose name starts with ‘F’ and the fourth character is ‘I’, rests may be any character. List the name and country of those customers and salesmen who belongs to the same country. Salesman table:           Customer table:

Fundamentals of Information Systems
9th Edition
ISBN:9781337097536
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter10: Ethical, Legal, And Social Issues Of Information Systems
Section: Chapter Questions
Problem 16SAT
icon
Related questions
Question

From the Salesman and Customer tables below, write SQL statements to do the following: 

  1. List the salesman id, rating and names of those salesmen who get rating from 3 to 5, sorted DESCENDING by rating.
  2. List all the customers’ information whose name starts with ‘F’ and the fourth character is ‘I’, rests may be any character.
  3. List the name and country of those customers and salesmen who belongs to the same country.

Salesman table:    

 

 

 

Customer table:

 

 

Salesman Salesman_ rating
_id
country
name
2001
Mc Lyon
3
Italy
2005
James hood
2
Canada
2045
Paul Hen
6
USA
2010
Nail Alex
4
France
2060
Salm E
5
KSA
Transcribed Image Text:Salesman Salesman_ rating _id country name 2001 Mc Lyon 3 Italy 2005 James hood 2 Canada 2045 Paul Hen 6 USA 2010 Nail Alex 4 France 2060 Salm E 5 KSA
Cust_id
Cust_nam
grade
country
Salesman
id
1
Nick
100
France
2010
Rimando
Brad Davis
400
Canada
2005
Fabian
200
Japan
2045
Johnson
4
UK
2010
Jozy
Altidor
100
5
Brad Guzan
500
Canada
2005
2.
3.
Transcribed Image Text:Cust_id Cust_nam grade country Salesman id 1 Nick 100 France 2010 Rimando Brad Davis 400 Canada 2005 Fabian 200 Japan 2045 Johnson 4 UK 2010 Jozy Altidor 100 5 Brad Guzan 500 Canada 2005 2. 3.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781337097536
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning