SHARE
TWEET

Untitled

a guest Jul 12th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT wizard.lastname, wizard.firstname, player.role, team.name AS team_name FROM player
  2.     JOIN wizard ON wizard.id=player.wizard_id
  3.     JOIN team ON team.id=player.team_id
  4.     ORDER BY team_name, player.role, wizard.lastname, wizard.firstname;
  5. +-----------------+-------------+--------+------------+
  6. | lastname        | firstname   | role   | team_name  |
  7. +-----------------+-------------+--------+------------+
  8. | Black           | Sirius      | beater | Gryffindor |
  9. | Brown           | Lavender    | beater | Gryffindor |
  10. | Finnigan        | Seamus      | beater | Gryffindor |
  11. | Hagrid          | Rubeus      | beater | Gryffindor |
  12. | Longbottom      | Alice       | beater | Gryffindor |
  13. | McGonagall      | Minerva     | beater | Gryffindor |
  14. | Potter          | Harry       | beater | Gryffindor |
  15. | Potter          | James       | beater | Gryffindor |
  16. | Thomas          | Dean        | beater | Gryffindor |
  17. | Weasley         | Arthur      | beater | Gryffindor |
  18. | Weasley         | Percy       | beater | Gryffindor |
  19. | Bell            | Katie       | chaser | Gryffindor |
  20. | Dumbledore      | Albus       | chaser | Gryffindor |
  21. | Granger         | Hermione    | chaser | Gryffindor |
  22. | J.              | Lily        | chaser | Gryffindor |
  23. | Jordan          | Lee         | chaser | Gryffindor |
  24. | Longbottom      | Augusta     | chaser | Gryffindor |
  25. | Longbottom      | Frank       | chaser | Gryffindor |
  26. | Longbottom      | Neville     | chaser | Gryffindor |
  27. | Pettigrew       | Peter       | chaser | Gryffindor |
  28. | Spinnet         | Alicia      | chaser | Gryffindor |
  29. | Weasley         | George      | chaser | Gryffindor |
  30. | Wood            | Oliver      | chaser | Gryffindor |
  31. |                 | Cadogan     | keeper | Gryffindor |
  32. | Creevey         | Dennis      | keeper | Gryffindor |
  33. | de              | Nicholas    | keeper | Gryffindor |
  34. | Dumbledore      | Aberforth   | keeper | Gryffindor |
  35. | Johnson         | Angelina    | keeper | Gryffindor |
  36. | Weasley         | Ginevra     | keeper | Gryffindor |
  37. | Binns           | Cuthbert    | seeker | Gryffindor |
  38. | Creevey         | Colin       | seeker | Gryffindor |
  39. | Gryffindor      | Godric      | seeker | Gryffindor |
  40. | Vane            | Romilda     | seeker | Gryffindor |
  41. | Weasley         | Fred        | seeker | Gryffindor |
  42. | Weasley         | Ronald      | seeker | Gryffindor |
  43. | Weasley         | William     | seeker | Gryffindor |
  44. | Abbott          | Hannah      | beater | Hufflepuff |
  45. | Finch-Fletchley | Justin      | beater | Hufflepuff |
  46. | Friar           | Fat         | beater | Hufflepuff |
  47. | Smith           | Hepzibah    | beater | Hufflepuff |
  48. | Sprout          | Pomona      | beater | Hufflepuff |
  49. | Tonks           | Nymphadora  | beater | Hufflepuff |
  50. | Bones           | Amelia      | chaser | Hufflepuff |
  51. | Scamander       | Newton      | chaser | Hufflepuff |
  52. | Bones           | Susan       | keeper | Hufflepuff |
  53. | Diggory         | Cedric      | keeper | Hufflepuff |
  54. | Smith           | Zacharias   | keeper | Hufflepuff |
  55. | Hufflepuff      | Helga       | seeker | Hufflepuff |
  56. | Clearwater      | Penelope    | beater | Ravenclaw  |
  57. | Quirrell        | Quirinus    | beater | Ravenclaw  |
  58. | Ravenclaw       | Helena      | beater | Ravenclaw  |
  59. | Warren          | Myrtle      | beater | Ravenclaw  |
  60. | Chang           | Cho         | chaser | Ravenclaw  |
  61. | Edgecombe       | Marietta    | chaser | Ravenclaw  |
  62. | Flitwick        | Filius      | chaser | Ravenclaw  |
  63. | Goldstein       | Anthony     | chaser | Ravenclaw  |
  64. | Lockhart        | Gilderoy    | chaser | Ravenclaw  |
  65. | Lovegood        | Luna        | chaser | Ravenclaw  |
  66. | Lovegood        | Xenophilius | chaser | Ravenclaw  |
  67. | Ollivander      | Garrick     | chaser | Ravenclaw  |
  68. | Corner          | Michael     | seeker | Ravenclaw  |
  69. | Ravenclaw       | Rowena      | seeker | Ravenclaw  |
  70. | Trelawney       | Sybill      | seeker | Ravenclaw  |
  71. | Bulstrode       | Millicent   | beater | Slytherin  |
  72. | Crabbe          | Vincent     | beater | Slytherin  |
  73. | Flint           | Marcus      | beater | Slytherin  |
  74. | Parkinson       | Pansy       | beater | Slytherin  |
  75. | Snape           | Severus     | beater | Slytherin  |
  76. | Zabini          | Blaise      | beater | Slytherin  |
  77. | Baron           | Bloody      | chaser | Slytherin  |
  78. | Lestrange       | Bellatrix   | chaser | Slytherin  |
  79. | Lestrange       | Rodolphus   | chaser | Slytherin  |
  80. | Malfoy          | Draco       | chaser | Slytherin  |
  81. | Malfoy          | Lucius      | chaser | Slytherin  |
  82. | Nigellus        | Phineas     | chaser | Slytherin  |
  83. | Nott            | Theodore    | chaser | Slytherin  |
  84. | Riddle          | Tom         | chaser | Slytherin  |
  85. | Tonks           | Andromeda   | chaser | Slytherin  |
  86. | Black           | Regulus     | keeper | Slytherin  |
  87. | Goyle           | Gregory     | seeker | Slytherin  |
  88. | Lestrange       | Rabastan    | seeker | Slytherin  |
  89. | Malfoy          | Narcissa    | seeker | Slytherin  |
  90. | Slytherin       | Salazar     | seeker | Slytherin  |
  91. | Umbridge        | Dolores     | seeker | Slytherin  |
  92. +-----------------+-------------+--------+------------+
  93.  
  94. SELECT wizard.firstname, wizard.lastname FROM player
  95.    JOIN wizard ON wizard.id=player.wizard_id
  96.    WHERE player.role='seeker'
  97.   ORDER BY wizard.lastname, wizard.firstname;
  98. +-----------+------------+
  99. | firstname | lastname   |
  100. +-----------+------------+
  101. | Cuthbert  | Binns      |
  102. | Michael   | Corner     |
  103. | Colin     | Creevey    |
  104. | Gregory   | Goyle      |
  105. | Godric    | Gryffindor |
  106. | Helga     | Hufflepuff |
  107. | Rabastan  | Lestrange  |
  108. | Narcissa  | Malfoy     |
  109. | Rowena    | Ravenclaw  |
  110. | Salazar   | Slytherin  |
  111. | Sybill    | Trelawney  |
  112. | Dolores   | Umbridge   |
  113. | Romilda   | Vane       |
  114. | Fred      | Weasley    |
  115. | Ronald    | Weasley    |
  116. | William   | Weasley    |
  117. +-----------+------------+
  118.  
  119. select * from player where role=null;
  120. Empty set (0.00 sec)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top