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
What is the maximum point for climbers whose country is United Kingdom?
assistant
SELECT max(Points) FROM climber WHERE Country = 'United Kingdom'
human
List the names of climbers whose country is not Switzerland.
assistant
SELECT Name FROM climber WHERE Country != 'Switzerland'
human
How many climbers are there?
assistant
SELECT count(*) FROM climber
human
How many distinct countries are the climbers from?
assistant
SELECT COUNT(DISTINCT Country) FROM climber
human
How many climbers are from each country?
assistant
SELECT Country , COUNT( * ) FROM climber GROUP BY Country ;