Database: climbing

CREATE TABLE "mountain" (
"Mountain_ID" int,
"Name" text,
"Height" real,
"Prominence" real,
"Range" text,
"Country" text,
PRIMARY KEY ("Mountain_ID")
);
CREATE TABLE "climber" (
"Climber_ID" int,
"Name" text,
"Country" text,
"Time" text,
"Points" real,
"Mountain_ID" int,
PRIMARY KEY ("Climber_ID"),
FOREIGN KEY ("Mountain_ID") REFERENCES "mountain"("Mountain_ID")
);

Question: How many climbers are there?
SQL: SELECT count(*) FROM climber

Question: Count the number of climbers.
SQL: SELECT count(*) FROM climber

Question: List the names of climbers in descending order of points.
SQL: SELECT Name FROM climber ORDER BY Points DESC

Question: What are the names of the climbers, ordered by points descending?
SQL: SELECT Name FROM climber ORDER BY Points DESC

Question: List the names of climbers whose country is not Switzerland.
SQL: SELECT Name FROM climber WHERE Country != "Switzerland"

Question: What are the names of climbers who are not from the country of Switzerland?
SQL: SELECT Name FROM climber WHERE Country != "Switzerland"

Question: What is the maximum point for climbers whose country is United Kingdom?
SQL: SELECT max(Points) FROM climber WHERE Country  =  "United Kingdom"

Question: Return the maximum number of points for climbers from the United Kingdom.
SQL: SELECT max(Points) FROM climber WHERE Country  =  "United Kingdom"

Question: How many distinct countries are the climbers from?
SQL: SELECT COUNT(DISTINCT Country) FROM climber

Question: Count the number of different countries that climbers are from.
SQL: SELECT COUNT(DISTINCT Country) FROM climber

Question: What are the names of mountains in ascending alphabetical order?
SQL: SELECT Name FROM mountain ORDER BY Name ASC

Question: Give the names of mountains in alphabetical order.
SQL: SELECT Name FROM mountain ORDER BY Name ASC

Question: What are the countries of mountains with height bigger than 5000?
SQL: SELECT Country FROM mountain WHERE Height  >  5000

Question: Return the countries of the mountains that have a height larger than 5000.
SQL: SELECT Country FROM mountain WHERE Height  >  5000

Question: What is the name of the highest mountain?
SQL: SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1

Question: Return the name of the mountain with the greatest height.
SQL: SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1

Question: List the distinct ranges of the mountains with the top 3 prominence.
SQL: SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3

Question: What are the different ranges of the 3 mountains with the highest prominence?
SQL: SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3

Question: Show names of climbers and the names of mountains they climb.
SQL: SELECT T1.Name ,  T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID

Question: What are the names of climbers and the corresponding names of mountains that they climb?
SQL: SELECT T1.Name ,  T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID

Question: Show the names of climbers and the heights of mountains they climb.
SQL: SELECT T1.Name ,  T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID

Question: What are the names of climbers and the corresponding heights of the mountains that they climb?
SQL: SELECT T1.Name ,  T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID

Question: Show the height of the mountain climbed by the climber with the maximum points.
SQL: 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

Question: What is the height of the mountain climbined by the climbing who had the most points?
SQL: 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

Question: Show the distinct names of mountains climbed by climbers from country "West Germany".
SQL: SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T1.Country  =  "West Germany"

Question: What are the different names of mountains ascended by climbers from the country of West Germany?
SQL: SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T1.Country  =  "West Germany"

Question: Show the times used by climbers to climb mountains in Country Uganda.
SQL: SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T2.Country  =  "Uganda"

Question: What are the times used by climbers who climbed mountains in the country of Uganda?
SQL: SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T2.Country  =  "Uganda"

Question: Please show the countries and the number of climbers from each country.
SQL: SELECT Country ,  COUNT(*) FROM climber GROUP BY Country

Question: How many climbers are from each country?
SQL: SELECT Country ,  COUNT(*) FROM climber GROUP BY Country

Question: List the countries that have more than one mountain.
SQL: SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*)  >  1

Question: Which countries have more than one mountain?
SQL: SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*)  >  1

Question: List the names of mountains that do not have any climber.
SQL: SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)

Question: What are the names of countains that no climber has climbed?
SQL: SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)

Question: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.
SQL: SELECT Country FROM mountain WHERE Height  >  5600 INTERSECT SELECT Country FROM mountain WHERE Height  <  5200

Question: What are the countries that have both mountains that are higher than 5600 and lower than 5200?
SQL: SELECT Country FROM mountain WHERE Height  >  5600 INTERSECT SELECT Country FROM mountain WHERE Height  <  5200

Question: Show the range that has the most number of mountains.
SQL: SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1

Question: Which range contains the most mountains?
SQL: SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1

Question: Show the names of mountains with height more than 5000 or prominence more than 1000.
SQL: SELECT Name FROM mountain WHERE Height  >  5000 OR Prominence  >  1000

Question: What are the names of mountains that have a height of over 5000 or a prominence of over 1000?
SQL: SELECT Name FROM mountain WHERE Height  >  5000 OR Prominence  >  1000