Created
June 3, 2019 09:27
-
-
Save Morzanne/5265109c71a78402a2ae197723d6c8bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT wizard.firstname, wizard.lastname, player.role, team.name FROM player | |
INNER JOIN team ON team.id = player.team_id | |
INNER JOIN wizard ON wizard.id = player.wizard_id | |
ORDER BY team.name, player.role, wizard.lastname, wizard.firstname; | |
SELECT wizard.firstname, wizard.lastname FROM player | |
INNER JOIN wizard ON wizard.id = player.wizard_id | |
WHERE player.role = 'seeker' | |
ORDER BY wizard.lastname, wizard.firstname; | |
SELECT wizard.firstname, wizard.lastname FROM player | |
RIGHT JOIN wizard ON wizard.id = player.wizard_id | |
WHERE player.role IS NULL; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment