Question
Answer the following questions with SQL queries using the NFL database. You can copy your queries here or submit a .sql file. This homework will
Answer the following questions with SQL queries using the NFL database. You can copy your queries here or submit a .sql file. This homework will be graded for completion.
Question 1
Write a query to classify punts based on the "net" yardages. If a punt is one standard deviation above the average net yardage, it's a "Good" punt. If a punt is one standard deviation below the average net yardage, it's a "Bad" punt. The rest are "Average" punts. You outcome table should contain at least three columns (additional columns are okay): pid, punter, and a column named "punt_cat" that takes the values 'Good, 'Bad', or 'Average'.
Question 2
Use the FGXP table only, write a query to count the number of 'long', 'medium', and 'short' of good field goals (FG). If distance is greater than 48 yards, it's a long FGs. If distance is between 28 and 48, inclusive, it's a medium FGs. The rest are short FGs. Your outcome table should contain two columns and three rows. You should order the rows by the 'count' column in descending order. The result should look like the following:
FG_type | count |
medium | 10526 |
short | 4284 |
long | 1782 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started