Skip to content

Instantly share code, notes, and snippets.

@clrko
Created June 3, 2020 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clrko/cf244464ab26705b6a5be1428340ecb8 to your computer and use it in GitHub Desktop.
Save clrko/cf244464ab26705b6a5be1428340ecb8 to your computer and use it in GitHub Desktop.
Quest5_database_mysql
SELECT lastname, firstname, role, name
FROM wizard
INNER JOIN player
ON wizard.id = player.wizard_id
INNER JOIN team
ON player.team_id = team.id
ORDER BY name, role, lastname, firstname ASC;
SELECT firstname, lastname
FROM wizard
INNER JOIN player
ON wizard.id = player.wizard_id
WHERE player.role = 'seeker';
SELECT firstname, lastname from wizard
LEFT JOIN player
ON wizard.id = player.wizard_id
WHERE player.wizard_id IS NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment