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
What is the name of the wrestler with the fewest days held?
assistant
SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1
human
List the names of wrestlers in descending order of days held.
assistant
SELECT Name FROM wrestler ORDER BY 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
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 time of elimination of the wrestlers with largest days held.
assistant
SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1
human
What are the times of elimination for wrestlers with over 50 days held?
assistant
SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50 ;