Gaela

Untitled

Dec 12th, 2021
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 6.45 KB | None | 0 0
  1. mysql> USE wild_db_quest
  2. Database changed
  3. mysql> SELECT firstname, lastname, role, name FROM wizard INNER JOIN player
  4.     -> ON wizard.id = player.wizard_id INNER JOIN team ON team.id = team_id
  5.     -> ORDER BY name, role, firstname, lastname;
  6. +-----------------+-------------+--------+------------+
  7. | firstname       | lastname    | role   | name       |
  8. +-----------------+-------------+--------+------------+
  9. | Black           | Sirius      | beater | Gryffindor |
  10. | Brown           | Lavender    | beater | Gryffindor |
  11. | Finnigan        | Seamus      | beater | Gryffindor |
  12. | Hagrid          | Rubeus      | beater | Gryffindor |
  13. | Longbottom      | Alice       | beater | Gryffindor |
  14. | McGonagall      | Minerva     | beater | Gryffindor |
  15. | Potter          | Harry       | beater | Gryffindor |
  16. | Potter          | James       | beater | Gryffindor |
  17. | Thomas          | Dean        | beater | Gryffindor |
  18. | Weasley         | Arthur      | beater | Gryffindor |
  19. | Weasley         | Percy       | beater | Gryffindor |
  20. | Bell            | Katie       | chaser | Gryffindor |
  21. | Dumbledore      | Albus       | chaser | Gryffindor |
  22. | Granger         | Hermione    | chaser | Gryffindor |
  23. | J.              | Lily        | chaser | Gryffindor |
  24. | Jordan          | Lee         | chaser | Gryffindor |
  25. | Longbottom      | Augusta     | chaser | Gryffindor |
  26. | Longbottom      | Frank       | chaser | Gryffindor |
  27. | Longbottom      | Neville     | chaser | Gryffindor |
  28. | Pettigrew       | Peter       | chaser | Gryffindor |
  29. | Spinnet         | Alicia      | chaser | Gryffindor |
  30. | Weasley         | George      | chaser | Gryffindor |
  31. | Wood            | Oliver      | chaser | Gryffindor |
  32. |                 | Cadogan     | keeper | Gryffindor |
  33. | Creevey         | Dennis      | keeper | Gryffindor |
  34. | de              | Nicholas    | keeper | Gryffindor |
  35. | Dumbledore      | Aberforth   | keeper | Gryffindor |
  36. | Johnson         | Angelina    | keeper | Gryffindor |
  37. | Weasley         | Ginevra     | keeper | Gryffindor |
  38. | Binns           | Cuthbert    | seeker | Gryffindor |
  39. | Creevey         | Colin       | seeker | Gryffindor |
  40. | Gryffindor      | Godric      | seeker | Gryffindor |
  41. | Vane            | Romilda     | seeker | Gryffindor |
  42. | Weasley         | Fred        | seeker | Gryffindor |
  43. | Weasley         | Ronald      | seeker | Gryffindor |
  44. | Weasley         | William     | seeker | Gryffindor |
  45. | Abbott          | Hannah      | beater | Hufflepuff |
  46. | Finch-Fletchley | Justin      | beater | Hufflepuff |
  47. | Friar           | Fat         | beater | Hufflepuff |
  48. | Smith           | Hepzibah    | beater | Hufflepuff |
  49. | Sprout          | Pomona      | beater | Hufflepuff |
  50. | Tonks           | Nymphadora  | beater | Hufflepuff |
  51. | Bones           | Amelia      | chaser | Hufflepuff |
  52. | Scamander       | Newton      | chaser | Hufflepuff |
  53. | Bones           | Susan       | keeper | Hufflepuff |
  54. | Diggory         | Cedric      | keeper | Hufflepuff |
  55. | Smith           | Zacharias   | keeper | Hufflepuff |
  56. | Hufflepuff      | Helga       | seeker | Hufflepuff |
  57. | Clearwater      | Penelope    | beater | Ravenclaw  |
  58. | Quirrell        | Quirinus    | beater | Ravenclaw  |
  59. | Ravenclaw       | Helena      | beater | Ravenclaw  |
  60. | Warren          | Myrtle      | beater | Ravenclaw  |
  61. | Chang           | Cho         | chaser | Ravenclaw  |
  62. | Edgecombe       | Marietta    | chaser | Ravenclaw  |
  63. | Flitwick        | Filius      | chaser | Ravenclaw  |
  64. | Goldstein       | Anthony     | chaser | Ravenclaw  |
  65. | Lockhart        | Gilderoy    | chaser | Ravenclaw  |
  66. | Lovegood        | Luna        | chaser | Ravenclaw  |
  67. | Lovegood        | Xenophilius | chaser | Ravenclaw  |
  68. | Ollivander      | Garrick     | chaser | Ravenclaw  |
  69. | Corner          | Michael     | seeker | Ravenclaw  |
  70. | Ravenclaw       | Rowena      | seeker | Ravenclaw  |
  71. | Trelawney       | Sybill      | seeker | Ravenclaw  |
  72. | Bulstrode       | Millicent   | beater | Slytherin  |
  73. | Crabbe          | Vincent     | beater | Slytherin  |
  74. | Flint           | Marcus      | beater | Slytherin  |
  75. | Parkinson       | Pansy       | beater | Slytherin  |
  76. | Snape           | Severus     | beater | Slytherin  |
  77. | Zabini          | Blaise      | beater | Slytherin  |
  78. | Baron           | Bloody      | chaser | Slytherin  |
  79. | Lestrange       | Bellatrix   | chaser | Slytherin  |
  80. | Lestrange       | Rodolphus   | chaser | Slytherin  |
  81. | Malfoy          | Draco       | chaser | Slytherin  |
  82. | Malfoy          | Lucius      | chaser | Slytherin  |
  83. | Nigellus        | Phineas     | chaser | Slytherin  |
  84. | Nott            | Theodore    | chaser | Slytherin  |
  85. | Riddle          | Tom         | chaser | Slytherin  |
  86. | Tonks           | Andromeda   | chaser | Slytherin  |
  87. | Black           | Regulus     | keeper | Slytherin  |
  88. | Goyle           | Gregory     | seeker | Slytherin  |
  89. | Lestrange       | Rabastan    | seeker | Slytherin  |
  90. | Malfoy          | Narcissa    | seeker | Slytherin  |
  91. | Slytherin       | Salazar     | seeker | Slytherin  |
  92. | Umbridge        | Dolores     | seeker | Slytherin  |
  93. +-----------------+-------------+--------+------------+
  94. 84 rows in set (0.06 sec)
  95.  
  96.  
  97. mysql> SELECT firstname, lastname FROM wizard INNER JOIN player ON wizard.id = player.wizard_id WHERE role IN('seeker') ORDER BY firstname, lastname;
  98. +------------+----------+
  99. | firstname  | lastname |
  100. +------------+----------+
  101. | Binns      | Cuthbert |
  102. | Corner     | Michael  |
  103. | Creevey    | Colin    |
  104. | Goyle      | Gregory  |
  105. | Gryffindor | Godric   |
  106. | Hufflepuff | Helga    |
  107. | Lestrange  | Rabastan |
  108. | Malfoy     | Narcissa |
  109. | Ravenclaw  | Rowena   |
  110. | Slytherin  | Salazar  |
  111. | Trelawney  | Sybill   |
  112. | Umbridge   | Dolores  |
  113. | Vane       | Romilda  |
  114. | Weasley    | Fred     |
  115. | Weasley    | Ronald   |
  116. | Weasley    | William  |
  117. +------------+----------+
  118. 16 rows in set (0.01 sec)
  119.  
  120.  
  121.  
  122. mysql> SELECT
  123.     ->     wizard.lastname, wizard.firstname
  124.     -> FROM
  125.     ->     wizard
  126.     ->         LEFT JOIN
  127.     ->     player ON wizard.id = player.wizard_id
  128.     -> WHERE
  129.     ->     player.wizard_id IS NULL;
  130. +----------+-----------+
  131. | lastname | firstname |
  132. +----------+-----------+
  133. | Terry    | Boot      |
  134. | Crabbe   |           |
  135. | Remus    | Lupin     |
  136. | Padma    | Patil     |
  137. | Parvati  | Patil     |
  138. | Demelza  | Robins    |
  139. | Horace   | Slughorn  |
  140. | Charles  | Weasley   |
  141. | Molly    | Weasley   |
  142. +----------+-----------+
  143. 9 rows in set (0.01 sec)
Add Comment
Please, Sign In to add comment