Salesman table: Salesman Salesman_ rating country _id name 2001 Mc Lyon 3 Italy 2005 James hood Canada 2045 Paul Hen 6 USA 2010 Nail Alex 4 France 2060 Salm E 5 KSA Customer table: Cust_id Cust_nam...


Question One


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:<br>Salesman Salesman_<br>rating<br>country<br>_id<br>name<br>2001<br>Mc Lyon<br>3<br>Italy<br>2005<br>James hood<br>Canada<br>2045<br>Paul Hen<br>6<br>USA<br>2010<br>Nail Alex<br>4<br>France<br>2060<br>Salm E<br>5<br>KSA<br>Customer table:<br>Cust_id<br>Cust_nam<br>grade<br>country<br>Salesman<br>_id<br>e<br>1<br>Nick<br>100<br>France<br>2010<br>Rimando<br>2<br>Brad Davis<br>400<br>Canada<br>2005<br>3<br>Fabian<br>200<br>Japan<br>2045<br>Johnson<br>4<br>100<br>UK<br>2010<br>Jozy<br>Altidor<br>Brad Guzan<br>500<br>Canada<br>2005<br>

Extracted text: Salesman table: Salesman Salesman_ rating country _id name 2001 Mc Lyon 3 Italy 2005 James hood Canada 2045 Paul Hen 6 USA 2010 Nail Alex 4 France 2060 Salm E 5 KSA Customer table: Cust_id Cust_nam grade country Salesman _id e 1 Nick 100 France 2010 Rimando 2 Brad Davis 400 Canada 2005 3 Fabian 200 Japan 2045 Johnson 4 100 UK 2010 Jozy Altidor Brad Guzan 500 Canada 2005

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here