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
Show the height of the mountain climbed by the climber with the maximum points.
assistant
SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1
human
How many distinct countries are the climbers from?
assistant
SELECT COUNT(DISTINCT Country) FROM climber
human
How many climbers are there?
assistant
SELECT count(*) FROM climber
human
Please show the countries and the number of climbers from each country.
assistant
SELECT Country , COUNT(*) FROM climber GROUP BY Country
human
List the names of climbers in descending order of points.
assistant
SELECT Name FROM climber ORDER BY Points DESC
human
Return the maximum number of points for climbers from the United Kingdom.
assistant
SELECT MAX( Points ) FROM climber WHERE Country = "United Kingdom" ;