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
How many wrestlers are there?
assistant
SELECT count(*) FROM wrestler
human
What are the names and location of the wrestlers?
assistant
SELECT Name , LOCATION FROM wrestler
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
What are the names of wrestlers days held less than 100?
assistant
SELECT Name FROM wrestler WHERE Days_held < 100
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
What are the names of wrestlers who have never been eliminated?
assistant
SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN ( SELECT Wrestler_ID FROM elimination ) ;