SQL Questionnaire
Description
Q1:
# SalesOrdersExample database
# Show me each vendor and the average by vendor of the number of days to deliver products
# (Hint: Use the AVG aggregate function and group on vendor)
Q2:
# SchoolSchedulingExample database
# List each staff member and the count of classes each is scheduled to teach
# (Hint: Use COUNT and group on staff name)
Q3:
# BowlingLeagueExample database
# Calculate the current average and handicap for each bowler
# (Hint: This is a friendly league, so the handicap is 90 percent of 200 minus the raw average Be sure to round the raw average and convert it to an integer before subtracting it from 200, and then round and truncate the final result Although the SQL Standard doesnt define a ROUND function, most commercial database systems provide one Check your product documentation for details)
Q4:
# BowlingLeagueExample database
# Display for each bowler the bowler name and the average of the bowlers raw game scores for bowlers whose average is greater than 155
# (Hint: You need a simple HAVING clause comparing the AVG to a numeric literal)
Q5:
# SchoolSchedulingExample database
# Show me the subject categories that have fewer than three full professors teaching that subject
# I did show you one way to correctly solve this problem in the section Avoiding the HAVING COUNT Trap using subqueries Now try to solve it correctly using JOINs and GROUP BY
# (Hint: Consider using OUTER JOIN and a subquery in the FROM clause)
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."