14.f.     Get a list of all of the teams (and the date of the game) that beat Dallas in their (the team that played Dallas) own arenas in the year 2000 AND beat them by 3 or more points (ordered by the score they beat them by).

 

SELECT teamname AS "Team", gamedate AS "Date Played", htscore-vtscore AS "Pt. Difference"

FROM game, team

WHERE htscore >= vtscore + 3

AND visitingteam = '1234'

AND hometeam = teamID

AND gamedate >= '01-JAN-2000' AND gamedate < '01-JAN-2001'

ORDER BY htscore-vtscore;

 

This yields the output:

 

Team          Date Played         Pt. Difference

-------------    -----------------        --------------

Buffalo       05-DEC-00         4