human
Schema:
wrestler (Wrestler_ID, Name, Reign, Days_held, Location, Event)
Elimination (Elimination_ID, Wrestler_ID, Team, Eliminated_By, Elimination_Move, Time)
Please answer with SQL.
assistant
Sure, I understand.
human
List the names of wrestlers and the teams in elimination in descending order of days held.
assistant
SELECT T2.Name , T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC
human
List the names of wrestlers that have not been eliminated.
assistant
SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
human
What are the names of wrestlers and the elimination moves?
assistant
SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID
human
Show the teams that have both wrestlers eliminated by 'Orton' and wrestlers eliminated by 'Benjamin'.
assistant
SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin'
human
Show the times of elimination by 'Punk' or 'Orton'.
assistant
SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton'
human
Return the elimination movies of wrestlers on Team Orton.
assistant
SELECT Elimination_Move FROM Elimination WHERE Team = "Team Orton" ;