db_id stringclasses 40
values | query stringlengths 22 608 | question stringlengths 22 185 |
|---|---|---|
art_1 | SELECT paintingID FROM paintings WHERE YEAR < (SELECT min(YEAR) FROM paintings WHERE LOCATION = 'Gallery 240') | What are the ids of the paintings created before all of the paintings in gallery 240? |
art_1 | SELECT paintingID FROM paintings WHERE YEAR < (SELECT min(YEAR) FROM paintings WHERE LOCATION = 'Gallery 240') | What is the id of every painting created before the oldest painting in gallery 240? |
art_1 | SELECT paintingID FROM paintings WHERE height_mm > (SELECT max(height_mm) FROM paintings WHERE YEAR > 1900) | What are the ids of the paintings whose height is longer than the height of all paintings created after 1900? |
art_1 | SELECT paintingID FROM paintings WHERE height_mm > (SELECT max(height_mm) FROM paintings WHERE YEAR > 1900) | List the ids of all paintings that are taller than the longest painting created after 1900. |
art_1 | SELECT T1.lname , T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.medium = "oil" GROUP BY T2.painterID ORDER BY count(*) DESC LIMIT 3 | Find the top 3 artists who have the biggest number of painting works whose medium is oil? |
art_1 | SELECT T1.lname , T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.medium = "oil" GROUP BY T2.painterID ORDER BY count(*) DESC LIMIT 3 | Which artists have the most paintings in oil? |
art_1 | SELECT paintingID , title , LOCATION FROM paintings WHERE medium = "oil" ORDER BY YEAR | List the painting id, location and title of the medium oil paintings ordered by year. |
art_1 | SELECT paintingID , title , LOCATION FROM paintings WHERE medium = "oil" ORDER BY YEAR | Order all of the oil paintings by date of creation and list their ids, locations, and titles. |
art_1 | SELECT title , LOCATION , YEAR FROM paintings WHERE height_mm > 1000 ORDER BY title | List the year, location and title of paintings whose height is longer than 1000 ordered by title. |
art_1 | SELECT title , LOCATION , YEAR FROM paintings WHERE height_mm > 1000 ORDER BY title | List the year, location, and name of all paintings that are taller than 1000 in alphabetical order. |
art_1 | SELECT T1.lname , T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID EXCEPT SELECT T3.lname , T3.fname FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID = T4.sculptorID | Find the first and last name of artists who have painting but no sculpture work. |
art_1 | SELECT T1.lname , T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID EXCEPT SELECT T3.lname , T3.fname FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID = T4.sculptorID | What are the first and last names of the artists who did not sculpt but could paint. |
art_1 | SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 AND mediumOn != "canvas" | Find the locations that have paintings before 1885 and no work with medium on canvas? |
art_1 | SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 AND mediumOn != "canvas" | Where do you have paintings that were created before 1885 that are not on canvas? |
car_road_race | SELECT count(*) FROM race | How many races are there? |
car_road_race | SELECT count(*) FROM race | Count the number of races. |
car_road_race | SELECT Winning_driver , Winning_team FROM race ORDER BY Winning_team ASC | List the winning drivers and winning teams of races in ascending alphabetical order of winning team. |
car_road_race | SELECT Winning_driver , Winning_team FROM race ORDER BY Winning_team ASC | What are the winning drivers and teams of races, ordered alphabetically by team? |
car_road_race | SELECT Winning_driver FROM race WHERE Pole_Position != 'Junior Strous' | Which winning drivers of races had pole position that is not "Junior Strous"? |
car_road_race | SELECT Winning_driver FROM race WHERE Pole_Position != 'Junior Strous' | Return the winning drivers of races who did not have the pole position of Junior Strous. |
car_road_race | SELECT DISTINCT CONSTRUCTOR FROM driver ORDER BY Age ASC | Who are the constructors of drivers sorted by drivers' age in ascending order? |
car_road_race | SELECT DISTINCT CONSTRUCTOR FROM driver ORDER BY Age ASC | Return the different constructors of drivers, ordered by age ascending. |
car_road_race | SELECT DISTINCT Entrant FROM driver WHERE Age >= 20 | What are the distinct entrant types of drivers aged 20 or older? |
car_road_race | SELECT DISTINCT Entrant FROM driver WHERE Age >= 20 | Give the different entrant types for drivers at least 20 years old. |
car_road_race | SELECT max(Age) , min(Age) FROM driver | What are the maximum and minimum age of driver? |
car_road_race | SELECT max(Age) , min(Age) FROM driver | Return the maximum and minimum age across drivers. |
car_road_race | SELECT count(DISTINCT Engine) FROM driver WHERE Age > 30 OR Age < 20 | How many different engines are used by drivers with age older than 30 or younger than 20? |
car_road_race | SELECT count(DISTINCT Engine) FROM driver WHERE Age > 30 OR Age < 20 | Count the number of different engines used by drivers who had an age either over 30 or under 20. |
car_road_race | SELECT Driver_Name FROM driver ORDER BY Driver_Name DESC | List all names of drivers in descending alphabetical order. |
car_road_race | SELECT Driver_Name FROM driver ORDER BY Driver_Name DESC | What are the names of drivers, ordered descending alphabetically? |
car_road_race | SELECT T1.Driver_Name , T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID | Please show the names of drivers and the names of races they participate in. |
car_road_race | SELECT T1.Driver_Name , T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID | What are the names of drivers and the names of the races they took part in? |
car_road_race | SELECT T1.Driver_Name , COUNT(*) FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID GROUP BY T1.Driver_ID | Please show the names of drivers and the number of races they participate in. |
car_road_race | SELECT T1.Driver_Name , COUNT(*) FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID GROUP BY T1.Driver_ID | How many races did each driver participate in? |
car_road_race | SELECT T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID GROUP BY T1.Driver_ID ORDER BY COUNT(*) DESC LIMIT 1 | Please show the age of the driver who participated in the most number of races. |
car_road_race | SELECT T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID GROUP BY T1.Driver_ID ORDER BY COUNT(*) DESC LIMIT 1 | What is the age of the driver who raced in the most races? |
car_road_race | SELECT T1.Driver_Name , T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID GROUP BY T1.Driver_ID HAVING COUNT(*) >= 2 | Please show the names and ages of the drivers who participated in at least two races. |
car_road_race | SELECT T1.Driver_Name , T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID GROUP BY T1.Driver_ID HAVING COUNT(*) >= 2 | What are the names and ages of drivers who raced in two or more races? |
car_road_race | SELECT T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE T1.Age >= 26 | Please list the names of races with drivers aged 26 or older participating. |
car_road_race | SELECT T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE T1.Age >= 26 | What are the names of races in which drivers 26 or older took part? |
car_road_race | SELECT Driver_Name FROM driver WHERE CONSTRUCTOR != "Bugatti" | List the names of drivers whose constructor is not "Bugatti". |
car_road_race | SELECT Driver_Name FROM driver WHERE CONSTRUCTOR != "Bugatti" | What are the names od drivers who did not have the constructor Bugatti? |
car_road_race | SELECT CONSTRUCTOR , COUNT(*) FROM driver GROUP BY CONSTRUCTOR | List different constructors and the number of drivers that use each constructor. |
car_road_race | SELECT CONSTRUCTOR , COUNT(*) FROM driver GROUP BY CONSTRUCTOR | How many drivers use each constructor? |
car_road_race | SELECT Engine FROM driver GROUP BY Engine ORDER BY COUNT(*) DESC LIMIT 1 | List the most common type of engine used by drivers. |
car_road_race | SELECT Engine FROM driver GROUP BY Engine ORDER BY COUNT(*) DESC LIMIT 1 | What is the most common type of engine? |
car_road_race | SELECT Engine FROM driver GROUP BY Engine HAVING COUNT(*) >= 2 | List the types of engines that are used by at least two drivers. |
car_road_race | SELECT Engine FROM driver GROUP BY Engine HAVING COUNT(*) >= 2 | What are the engine types that are used by two or more drivers? |
car_road_race | SELECT Driver_Name FROM driver WHERE Driver_ID NOT IN (SELECT Driver_ID FROM race) | List the names of drivers that do not participate in any race. |
car_road_race | SELECT Driver_Name FROM driver WHERE Driver_ID NOT IN (SELECT Driver_ID FROM race) | What are names of drivers who did not take part in a race? |
car_road_race | SELECT CONSTRUCTOR FROM driver WHERE Age < 20 INTERSECT SELECT CONSTRUCTOR FROM driver WHERE Age > 30 | Show the constructors that are used both by drivers with age lower than 20 and drivers with age over than 30. |
car_road_race | SELECT CONSTRUCTOR FROM driver WHERE Age < 20 INTERSECT SELECT CONSTRUCTOR FROM driver WHERE Age > 30 | What are the constructors who are used by both drivers who are younger than 20 and drivers older than 30? |
car_road_race | SELECT Winning_team FROM race GROUP BY Winning_team HAVING count(*) > 1 | Find the teams that won more than once. |
car_road_race | SELECT Winning_team FROM race GROUP BY Winning_team HAVING count(*) > 1 | Which teams won more than 1 race? |
car_road_race | SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = "Carl Skerlong" INTERSECT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = "James Hinchcliffe" | Find the names of drivers who were in both "James Hinchcliffe" and "Carl Skerlong" pole positions before. |
car_road_race | SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = "Carl Skerlong" INTERSECT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = "James Hinchcliffe" | What are the names of drivers who had both the pole position James Hinchcliffe and the pole position Carl Skerlong? |
car_road_race | SELECT Driver_Name FROM driver EXCEPT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = "James Hinchcliffe" | find the name of drivers who were never in "James Hinchcliffe" pole position before. |
car_road_race | SELECT Driver_Name FROM driver EXCEPT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = "James Hinchcliffe" | What are the names of drivers except for those who had the pole position James Hinchcliffe? |
country_language | SELECT count(*) FROM languages | How many languages are there? |
country_language | SELECT count(*) FROM languages | Count the number of languages. |
country_language | SELECT name FROM languages ORDER BY name ASC | List the name of languages in ascending alphabetical order. |
country_language | SELECT name FROM languages ORDER BY name ASC | What are the names of languages, in alphabetical order? |
country_language | SELECT name FROM languages WHERE name LIKE "%ish%" | What are the names of languages that contain the word "ish"? |
country_language | SELECT name FROM languages WHERE name LIKE "%ish%" | Return the names of langauges that contain the substring "ish". |
country_language | SELECT name FROM countries ORDER BY overall_score DESC | Show the names of countries in descending order of overall scores. |
country_language | SELECT name FROM countries ORDER BY overall_score DESC | What are the names of the countries, ordered descending by overall score? |
country_language | SELECT avg(justice_score) FROM countries | What is the average justice scores among countries? |
country_language | SELECT avg(justice_score) FROM countries | Give the average justice scores across all countries. |
country_language | SELECT max(health_score) , min(health_score) FROM countries WHERE name != "Norway" | What are the maximum and minimum health scores among countries that are not "Norway". |
country_language | SELECT max(health_score) , min(health_score) FROM countries WHERE name != "Norway" | Return the maximum and minimum health scores across all countries other than Norway. |
country_language | SELECT count(DISTINCT language_id) FROM official_languages | How many different official languages are there? |
country_language | SELECT count(DISTINCT language_id) FROM official_languages | Count the number of different official languages. |
country_language | SELECT name FROM countries ORDER BY education_score DESC | List names of countries in descending order of education_score. |
country_language | SELECT name FROM countries ORDER BY education_score DESC | What are the names of the countries, ordered descending by education score? |
country_language | SELECT name FROM countries ORDER BY politics_score DESC LIMIT 1 | List the name of the country with the biggest score in politics. |
country_language | SELECT name FROM countries ORDER BY politics_score DESC LIMIT 1 | What is the name of the country with the highest politics score? |
country_language | SELECT T1.name , T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id | Show the names of countries and their official languages. |
country_language | SELECT T1.name , T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id | What are the names of the countries, as well as the names of their official langauges? |
country_language | SELECT T2.name , COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.name | Show the official languages and the number of countries speaking each language. |
country_language | SELECT T2.name , COUNT(*) FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.name | What are the names of the different official languages, as well as the number of countries that speak each? |
country_language | SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 | Show the official language spoken by the most number of countries. |
country_language | SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 | What is the official language that is most common? |
country_language | SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id HAVING COUNT(*) >= 2 | Show the official languages spoken by at least two countries. |
country_language | SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id HAVING COUNT(*) >= 2 | Which official languages are spoken in two or more countries? |
country_language | SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T3.name = "English" | Show the average overall scores of countries whose official language is "English". |
country_language | SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T3.name = "English" | What is the average overall score across countries with English as their official language? |
country_language | SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3 | Show the three official languages that are most commonly spoken. |
country_language | SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3 | What are the names of the three official languages spoken in the most countries? |
country_language | SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC | Show the official languages sorted in descending order by the average overall scores among countries speaking them. |
country_language | SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC | What are the names of the official languages, sorted descending by the average overall scores across the countries that correspond to each? |
country_language | SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 | Show the name of the country that has the greatest number of official languages. |
country_language | SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 | Which country has the greatest number of official languages? |
country_language | SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages) | List the names of languages that are not the official language of any countries. |
country_language | SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages) | What are the names of languages that are not the official language of any country? |
country_language | SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages) | List the names of countries that do not have any official language. |
country_language | SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages) | What are the names of countries that do not have an official language? |
country_language | SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score > 95 INTERSECT SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3... | Show the names of languages that are the official language for both countries with overall score greater than 95 and countries with overall score less than than 90. |
country_language | SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T1.overall_score > 95 INTERSECT SELECT T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3... | What are the names of languages that are the official language not only for countries that have an overall score of above 95, but also for countries that have an overall score below 90? |
real_estate_rentals | SELECT country , town_city FROM Addresses; | Which countries and cities are included in addresses? |
real_estate_rentals | SELECT country , town_city FROM Addresses; | What are the countries and cities for each address? |
Subsets and Splits
World Countries Non-English Languages
The query filters specific database entries based on a particular query pattern, providing limited insight as it simply retrieves rows that match a specific condition.