Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago