Question
There is data given in TABLE ENGLAND as given in Image /*Q3 (2 pt) Find for each team in England in tier 1 the total
There is data given in TABLE ENGLAND as given in Image
/*Q3 (2 pt)
Find for each team in England in tier 1 the total number of games played since 1980.
Report only teams with at least 300 games.
Hint. Find the number of games each team has played as "home".
Find the number of games each team has played as "visitor".
Then union the two and take the sum of the number of games. */
/*Your query here*/
/*Sample result
Everton 1451
Liverpool 1451
...*/
/*Q4 (1 pt)
For each pair team1, team2 in England find the number of home-wins since 1980 of team1 versus team2.
Order the results by the number of home-wins in descending order.
Hint. After selecting the tuples needed (... WHERE tier=1 AND ...) do a GROUP BY home, visitor.
*/
/*Your query here*/
/*Sample result
Manchester United Tottenham Hotspur 27
Arsenal Everton 26
...*/
/*Q5 (1 pt)
For each pair team1, team2 in England find the number of away-wins since 1980 of team1 versus team2.
Order the results by the number of away-wins in descending order.*/
/*Your query here*/
/*Sample result
Aston Villa Manchester United 18
Aston Villa Arsenal 17
...*/
/*Q6 (2 pt)
For each pair team1, team2 in England report the number of home-wins and away-wins
since 1980 of team1 versus team2.
Order the results by the number of away-wins in descending order.
Hint. Join the results of the two previous queries. To do that you can use those
queries as subqueries. Remove their ORDER BY clause when making them subqueries.
Be careful on the join conditions. */
/*Your query here*/
/*Sample result
Manchester United Aston Villa 26 18
Arsenal Aston Villa 20 17
...*/
ENGLAND I Enter a SQL expression to filter results (use Ctrl-Space) 123 day T:123 SEASON TII ABC HOME T: ABC VISITOR TS ABC FT :l 123 HGOAL :| 123 VGOAL TS 123 DIVISION TI 123 TIER T 123 TOTGOAL TII 123 GOALDIF T:l ABC result 6-2 7-3 2-5 2-1 1,888 Bolton Wanderers Everton 1,888 Bolton Wanderers Notts County 1,888 Bolton Wanderers Preston North End 1,888 Bolton Wanderers Stoke City 1,838 Bolton Wanderers West Bromwich Albion 1-2 1,888 Bolton Wanderers Wolverhampton Wanderers 2-1 1,888 Burnley 1,838 Burnley 1,838 Burnley 1,838 Burnley 1,888 Burnley 1,88 Burnley 1,888 Burnley 1,888 Burnley 1,838 Burnley 1,888 Burnley 1,888 Burnley 1,888 Derby CountyAccrington F.C. 1,838 Derby County Aston Villa 1,838 Derby County Blackburn Rovers 1,888 Derby County Bolton Wanderers 1,838 Derby County Burnley 10 1 H 43 1 H Accrington F.C. Aston Villa Blackburn Rovers 45 2-2 4 H -6 A 1-7 4-1 1-0 2-2 1-0 2-2 2-1 2-0 Wolverhampton Wanderers 0-4 Derby County Everton Notts County Preston North End Stoke City West Bromwich Albion 17 1 H 4 A 57 3 H 0-2 2-3 1-0 1 H ENGLAND I Enter a SQL expression to filter results (use Ctrl-Space) 123 day T:123 SEASON TII ABC HOME T: ABC VISITOR TS ABC FT :l 123 HGOAL :| 123 VGOAL TS 123 DIVISION TI 123 TIER T 123 TOTGOAL TII 123 GOALDIF T:l ABC result 6-2 7-3 2-5 2-1 1,888 Bolton Wanderers Everton 1,888 Bolton Wanderers Notts County 1,888 Bolton Wanderers Preston North End 1,888 Bolton Wanderers Stoke City 1,838 Bolton Wanderers West Bromwich Albion 1-2 1,888 Bolton Wanderers Wolverhampton Wanderers 2-1 1,888 Burnley 1,838 Burnley 1,838 Burnley 1,838 Burnley 1,888 Burnley 1,88 Burnley 1,888 Burnley 1,888 Burnley 1,838 Burnley 1,888 Burnley 1,888 Burnley 1,888 Derby CountyAccrington F.C. 1,838 Derby County Aston Villa 1,838 Derby County Blackburn Rovers 1,888 Derby County Bolton Wanderers 1,838 Derby County Burnley 10 1 H 43 1 H Accrington F.C. Aston Villa Blackburn Rovers 45 2-2 4 H -6 A 1-7 4-1 1-0 2-2 1-0 2-2 2-1 2-0 Wolverhampton Wanderers 0-4 Derby County Everton Notts County Preston North End Stoke City West Bromwich Albion 17 1 H 4 A 57 3 H 0-2 2-3 1-0 1 HStep 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