14d2. Get a list of all players who have played in tie games (ordered by player name). Do NOT duplicate player names.
SELECT
DISTINCT playername
FROM
game, team, employs, player
WHERE
htscore = vtscore
AND
(hometeam = team.teamID OR visitingteam = team.teamID)
AND
team.teamID = employs.teamID
AND
employs.playerID = player.playerID
AND
gamedate >= startdate
AND
(gamedate <= enddate OR enddate IS NULL)
ORDER
BY playername;
This yields the output:
PLAYERNAME
------------------
Bathgate, A.
Belfours, E.
Borque, R.
Esposito, T.
Gretzky, W.
Hasek, D.
Horton, T.
Howe, G.
Hull, Bobby
Hull, Bret
Jagr, J.
LaFleur, G.
LaPointe, G.
LeMieux, M.
Lindsey, T.
Martin, R.
Orr, B.
Park, B.
Plante, J.
Richard, M.
Robinson, L.
Ruutu, C.
Savard, D.
Schoenfeld, J.
Strudland, B.
25 rows selected.