14.b.    Get a list of all of the teams (ordered by team name), and the dates played, that Dallas (TeamID = ‘1234’) played.

 

SELECT teamname, Gamedate

FROM team, game

WHERE (hometeam = '1234' and visitingteam = teamid)

OR (visitingteam = '1234' and hometeam = teamid)

ORDER BY teamname, gamedate;

 

This produces the output:

 

 

TEAMNAME               GAMEDATE

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

Buffalo                          05-DEC-00

Buffalo                          30-DEC-00

Buffalo                          04-FEB-01

Buffalo                          02-APR-01

Chicago                         11-NOV-00

Chicago                         26-DEC-00

Montreal             14-JAN-01

Montreal             22-JAN-01

New York Rangers       24-JAN-01

New York Rangers       08-MAR-01

 

10 rows selected.