Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Give the following table, Answer the questions below: salesman_id name city comm

ID: 3863941 • Letter: G

Question

Give the following table, Answer the questions below:

salesman_id name        city        commission

----------- ---------- ---------- ----------

5001         James Hoog New York    0.15

5002         Nail Knite Paris       0.13

5005         Pit Alex    London      0.11

5006         Mc Lyon     Paris       0.14

5003         Lauson Hen San Jose    0.12

5007         Paul Adam   Rome        0.13

      Write a sql statement to display only the name and city information of all salesmen.

      Write a sql statement to display the information for salesmen in the city of Paris.

      Write a sql statement to display all the information of all salesmen ordered in descending order of commission.

Explanation / Answer

I am assuming the table name as SalesPerson (as its not mentioned in the question

1) Select name, city from SalesPerson;
This will select name and city colum of all salesman

2) Select * from SalesPerson where city = 'Paris'
Here * is used to print all the colums from SalesPerson based on where condition.

3) Select * from SalesPerson ORDER BY commission DESC;

Here * to select all colums and order by is used to sort the result based on specified colum.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote