COMP3311 20T3 The University of New South Wales Database Systems
COMP3311 Database Systems
20T3
[Instructions] [Notes] [Database] [Course Website] [Cheat Sheets]
[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8] [Q9] [Q10] [Q11] [Q12]
Question 3 (8 marks)
Write an SQL view that gives the country name of the team which has the most players who have never scored a goal.
The view should show the number of goal-less players, as well as the country name.
Instructions:
Work on this question in the work/q3/ directory
Define a view q3(team,nplayers) in the file q3.sql
Also, place any additional views used by q3 in this file
Additional views must be placed before the q3 definition
Load it into your database using: psql footy -f q3.sql Sample output is in the file: tests/01.expected
Test it via: select * from q3 order by team;
Check it using: sh check q3 in the q3 directory
Submit it using: give cs3311 sample_q3 q3.sql or Webcms3
End of Question