Need help with my SQL statements and figuring out the nesting involved.
There are three tables: tblSalesPerson (SName, PercentOfQuota, Salary) tblOrder (OrderNumber, CustName, SalespersonName, Amount) tblCustomer (CName, City, IndustryType) The sample data are shown in the next slide. 1 Assignment CName City IndustryType Abernathy Construction Willow B Amalgamated Housing Memphis B Manchester Lumber Manchester F Tri-City Builders Memphis B SName PercentofQuota Salary Abel 63 $120,000.00 Baker 38 $42,000.00 Jones 26 $36,000.00 Kobad 27 $36,000.00 Murphy 42 $50,000.00 Zenith 59 $118,000.00 OrderNumber CustName SalespersonName Amount 100 Abernathy Construction Zenith $560.00 200 Abernathy Construction Jones $1,800.00 300 Manchester Lumber Abel $480.00 400 Amalgamated Housing Abel $2,500.00 500 Abernathy Construction Murphy $6,000.00 600 Tri-City Builders Abel $700.00 700 Manchester Lumber Jones $150.00 800 Tri-City Builders Abel $800.00 900 Abernathy Construction Abel $600.00 tblCustomer tblSalesperson tblOrder 2 Please write SQL statements to answer the following questions (Please use a piece of paper to write the SQL statements first, and then type the SQL statements into MySQL to check the results, then copy the SQL statements to a Word file. Submit the Word file to Canvas) Q1: show the salaries of all salespeople. Q2: show the salaries of all salespeople but omit duplicates. Q3: show the names of all salespeople who have an order with Abernathy Construction Q4: show the names of all salespeople who earn more than $49,999 and less than $100,000. Q5: show the names of customers who are located in a city ending with S. Q6: compute the number of orders. 3 Q7: Show the average percent of quota for salespersons. Q7-1: Show the name and the total amount of sales for each salesperson. Q8: show the names and salary of all salespeople who do not have an order with Abernathy construction, in ascending order of salary. Q9: show the name of the salesperson with highest percent of quota. Q10: compute the number of orders for each salesperson. Q11: compute the number of orders for each salesperson, considering only orders for an amount exceeding 500. Q12: show the names and quota percentages of salespeople who have an order with Abernathy Construction, in descending order of quota percentage (use a subquery) 4 Q13: show the names and quota percentages of salespeople who have an order with Abernathy Construction, in descending order of quota percentage (use a join) Q14: show the quota percentages of salespeople who have an order with a customer in Memphis (use a subquery). Q15: show the quota percentages of salespeople who have an order with a customer in Memphis (use a join). Q16: show the names of salespeople who have two or more orders. Q17: Show a SQL statement to give all salespeople 10 percent pay increase Q18: show a SQL statement to insert a new row ("SafeWay", "Spokane", "A") into tblCustomer Q19: show a SQL statement to change SafeWay’s IndustryType to C. Q20: show a SQL statement to delete SafeWay from tblCustomer. 5