human
Schema:
mountain (Mountain_ID, Name, Height, Prominence, Range, Country)
climber (Climber_ID, Name, Country, Time, Points, Mountain_ID)
Please answer with SQL.
assistant
Sure, I understand.
human
List the names of climbers in descending order of points.
assistant
SELECT Name FROM climber ORDER BY Points DESC
human
Show names of climbers and the names of mountains they climb.
assistant
SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
human
How many climbers are there?
assistant
SELECT count(*) FROM climber
human
List the names of mountains that do not have any climber.
assistant
SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)
human
How many distinct countries are the climbers from?
assistant
SELECT COUNT(DISTINCT Country) FROM climber
human
What are the names of climbers who are not from the country of Switzerland?
assistant
SELECT Name FROM climber WHERE Country != "Switzerland" ;