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 countries that have more than one mountain.
assistant
SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1
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
Please show the countries and the number of climbers from each country.
assistant
SELECT Country , COUNT(*) FROM climber GROUP BY Country
human
How many distinct countries are the climbers from?
assistant
SELECT COUNT( DISTINCT Country ) FROM climber ;