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
What are the names of mountains in ascending alphabetical order?
assistant
SELECT Name FROM mountain ORDER BY Name ASC
human
What are the countries of mountains with height bigger than 5000?
assistant
SELECT Country FROM mountain WHERE Height > 5000
human
What is the name of the highest mountain?
assistant
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
human
List the countries that have more than one mountain.
assistant
SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1
human
List the distinct ranges of the mountains with the top 3 prominence.
assistant
SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3
human
Which range contains the most mountains?
assistant
SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT( * ) DESC LIMIT 1 ;