Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 [35%] Consider the following two tables, TEAMID TEAMNAME MATCHDATE HOME AWAY HOMESCORE AWAYSCORE Riders Motors Eagles Panthers Knights Suns Sonics Warriors Lions 12/9/2015
Question 2 [35%] Consider the following two tables, TEAMID TEAMNAME MATCHDATE HOME AWAY HOMESCORE AWAYSCORE Riders Motors Eagles Panthers Knights Suns Sonics Warriors Lions 12/9/2015 12/9/2015 13/9/2015 13/9/2015 18/9/2015 19/9/2015 19/9/2015 26/9/2015 26/9/2015 27/9/2015 27/9/2015 4 3 (a) Write a SQL statement to return the total number of home game(s) (including home and away games) did the team, with TEAMID as 4, played. Note that the returned value is shown in the expression as TOTALGAME. [3%] (b) Write a SQL statement to show the average score among all home games of team with TEAMID as 8. Note that the returned value is shown in the expression as AVGSCORE. [396] (c) Write a SQL statement to return total number of game(s) did the team Eagles played. Note that the returned value is shown in the expression as TOTALGAME. [5%]
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