question
string
answer
string
context
string
dialect
string
spider_hardness
string
extended_hardness
string
classification_status
string
syntax_status
string
ddl_syntax_status
string
schema_status
string
syntax_errors
list
ddl_syntax_errors
list
schema_errors
list
classification_errors
list
status_history
list
correction_status
string
component1
int64
component2
int64
others
int64
validation_source
dict
What is the total population and maximum GNP in Asia?
SELECT SUM(Population), MAX(GNP) FROM country WHERE Continent = 'Asia'
CREATE TABLE country (Population INTEGER, GNP INTEGER, Continent VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
2
{ "split": "train", "row_index": 4356 }
What is the average life expectancy in African countries that are republics?
SELECT AVG(LifeExpectancy) FROM country WHERE Continent = 'Africa' AND GovernmentForm = 'Republic'
CREATE TABLE country (LifeExpectancy INTEGER, Continent VARCHAR(255), GovernmentForm VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4357 }
What is the total surface area of the continents Asia and Europe?
SELECT SUM(SurfaceArea) FROM country WHERE Continent = 'Asia' OR Continent = 'Europe'
CREATE TABLE country (SurfaceArea INTEGER, Continent VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4358 }
How many people live in Gelderland district?
SELECT SUM(Population) FROM city WHERE District = 'Gelderland'
CREATE TABLE city (Population INTEGER, District VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4359 }
What is the average GNP and total population in all nations whose government is US territory?
SELECT AVG(GNP), SUM(population) FROM country WHERE GovernmentForm = 'US Territory'
CREATE TABLE country (GNP INTEGER, population INTEGER, GovernmentForm VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
2
{ "split": "train", "row_index": 4360 }
How many unique languages are spoken in the world?
SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage
CREATE TABLE countrylanguage (LANGUAGE VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 4361 }
How many type of governments are in Africa?
SELECT COUNT(DISTINCT GovernmentForm) FROM country WHERE Continent = 'Africa'
CREATE TABLE country (GovernmentForm VARCHAR(255), Continent VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4362 }
What is the total number of languages used in Aruba?
SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Aruba'
CREATE TABLE country (Code VARCHAR(255), Name VARCHAR(255)); CREATE TABLE countrylanguage (Language VARCHAR(255), CountryCode VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4363 }
What is name of the country that speaks the largest number of languages?
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE countrylanguage (CountryCode VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE country (Name VARCHAR(255), Code VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
0
{ "split": "train", "row_index": 4365 }
Which continent has the most diverse languages?
SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE countrylanguage (CountryCode VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE country (Continent VARCHAR(255), Code VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
0
{ "split": "train", "row_index": 4366 }
How many countries speak both English and Dutch?
SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Dutch')
CREATE TABLE country (Name VARCHAR(255), Code VARCHAR(255)); CREATE TABLE countrylanguage (CountryCode VARCHAR(255), Language VARCHAR(255))
generic
easy
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 4367 }
What are the names of nations speak both English and French?
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'French'
CREATE TABLE country (Name VARCHAR(255), Code VARCHAR(255)); CREATE TABLE countrylanguage (CountryCode VARCHAR(255), Language VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
1
0
{ "split": "train", "row_index": 4368 }
What are the names of nations where both English and French are official languages?
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T' INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'French' AND T2.IsOfficial = 'T'
CREATE TABLE countrylanguage (CountryCode VARCHAR(255), Language VARCHAR(255), IsOfficial VARCHAR(255)); CREATE TABLE country (Name VARCHAR(255), Code VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
1
1
{ "split": "train", "row_index": 4369 }
What are the regions that use English or Dutch?
SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' OR T2.Language = 'Dutch'
CREATE TABLE countrylanguage (CountryCode VARCHAR(255), Language VARCHAR(255)); CREATE TABLE country (Region VARCHAR(255), Code VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 4371 }
Which language is the most popular on the Asian continent?
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Asia' GROUP BY T2.Language ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE country (Code VARCHAR(255), Continent VARCHAR(255)); CREATE TABLE countrylanguage (Language VARCHAR(255), CountryCode VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
5
0
0
{ "split": "train", "row_index": 4374 }
Which languages are spoken by only one country in republic governments?
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = 'Republic' GROUP BY T2.Language HAVING COUNT(*) = 1
CREATE TABLE countrylanguage (Language VARCHAR(255), CountryCode VARCHAR(255)); CREATE TABLE country (Code VARCHAR(255), GovernmentForm VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 4375 }
Find the city with the largest population that uses English.
SELECT T1.Name, T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = 'English' ORDER BY T1.Population DESC LIMIT 1
CREATE TABLE city (Name VARCHAR(255), Population VARCHAR(255), CountryCode VARCHAR(255)); CREATE TABLE countrylanguage (CountryCode VARCHAR(255), Language VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 4376 }
Find the name, population and expected life length of asian country with the largest area?
SELECT Name, Population, LifeExpectancy FROM country WHERE Continent = 'Asia' ORDER BY SurfaceArea DESC LIMIT 1
CREATE TABLE country (Name VARCHAR(255), Population VARCHAR(255), LifeExpectancy VARCHAR(255), Continent VARCHAR(255), SurfaceArea VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 4377 }
What is the official language spoken in the country whose head of state is Beatrix?
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = 'Beatrix' AND T2.IsOfficial = 'T'
CREATE TABLE country (Code VARCHAR(255), HeadOfState VARCHAR(255)); CREATE TABLE countrylanguage (Language VARCHAR(255), CountryCode VARCHAR(255), IsOfficial VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4380 }
What are the countries that have greater surface area than any country in Europe?
SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = 'Europe')
CREATE TABLE country (Name VARCHAR(255), SurfaceArea INTEGER, Continent VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 4382 }
What are the African countries that have a population less than any country in Asia?
SELECT Name FROM country WHERE Continent = 'Africa' AND population < (SELECT MAX(population) FROM country WHERE Continent = 'Asia')
CREATE TABLE country (Name VARCHAR(255), Continent VARCHAR(255), population INTEGER)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
1
{ "split": "train", "row_index": 4383 }
Which African countries have a smaller population than that of any country in Asia?
SELECT Name FROM country WHERE Continent = 'Africa' AND population < (SELECT MIN(population) FROM country WHERE Continent = 'Asia')
CREATE TABLE country (Name VARCHAR(255), Continent VARCHAR(255), population INTEGER)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
1
{ "split": "train", "row_index": 4384 }
Which Asian countries have a population that is larger than any country in Africa?
SELECT Name FROM country WHERE Continent = 'Asia' AND population > (SELECT MAX(population) FROM country WHERE Continent = 'Africa')
CREATE TABLE country (Name VARCHAR(255), Continent VARCHAR(255), population INTEGER)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
1
{ "split": "train", "row_index": 4385 }
What are the Asian countries which have a population larger than that of any country in Africa?
SELECT Name FROM country WHERE Continent = 'Asia' AND population > (SELECT MIN(population) FROM country WHERE Continent = 'Africa')
CREATE TABLE country (Name VARCHAR(255), Continent VARCHAR(255), population INTEGER)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
1
{ "split": "train", "row_index": 4386 }
What are the country codes for countries that do not speak English?
SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = 'English'
CREATE TABLE countrylanguage (CountryCode VARCHAR(255), LANGUAGE VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
1
0
{ "split": "train", "row_index": 4387 }
What are the country codes of countries where people use languages other than English?
SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE <> 'English'
CREATE TABLE countrylanguage (CountryCode VARCHAR(255), LANGUAGE VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4388 }
What are the codes of the countries that do not speak English and whose government forms are not Republic?
SELECT Code FROM country WHERE GovernmentForm <> 'Republic' EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = 'English'
CREATE TABLE countrylanguage (Code VARCHAR(255), CountryCode VARCHAR(255), GovernmentForm VARCHAR(255), LANGUAGE VARCHAR(255)); CREATE TABLE country (Code VARCHAR(255), CountryCode VARCHAR(255), GovernmentForm VARCHAR(255), LANGUAGE VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 4389 }
Which unique cities are in Asian countries where Chinese is the official language ?
SELECT DISTINCT t3.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode JOIN city AS t3 ON t1.code = t3.countrycode WHERE t2.isofficial = 't' AND t2.language = 'chinese' AND t1.continent = 'asia'
CREATE TABLE city (name VARCHAR(255), countrycode VARCHAR(255)); CREATE TABLE countrylanguage (countrycode VARCHAR(255), isofficial VARCHAR(255), language VARCHAR(255)); CREATE TABLE country (code VARCHAR(255), continent VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 4391 }
Return the different names of cities that are in Asia and for which Chinese is the official language.
SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = 'Asia'
CREATE TABLE country (Code VARCHAR(255), Continent VARCHAR(255)); CREATE TABLE countrylanguage (CountryCode VARCHAR(255), IsOfficial VARCHAR(255), Language VARCHAR(255)); CREATE TABLE city (Name VARCHAR(255), CountryCode VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 4392 }
What are the name, independence year, and surface area of the country with the smallest population?
SELECT Name, SurfaceArea, IndepYear FROM country ORDER BY Population LIMIT 1
CREATE TABLE country (Name VARCHAR(255), SurfaceArea VARCHAR(255), IndepYear VARCHAR(255), Population VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4393 }
What are the population, name and leader of the country with the largest area?
SELECT Name, population, HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1
CREATE TABLE country (Name VARCHAR(255), population VARCHAR(255), HeadOfState VARCHAR(255), SurfaceArea VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4394 }
Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.
SELECT COUNT(T2.Language), T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2
CREATE TABLE country (Name VARCHAR(255), Code VARCHAR(255)); CREATE TABLE countrylanguage (Language VARCHAR(255), CountryCode VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4395 }
Find the number of cities in each district whose population is greater than the average population of cities?
SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District
CREATE TABLE city (District VARCHAR(255), Population INTEGER)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
1
1
{ "split": "train", "row_index": 4396 }
Find the government form name and total population for each government form whose average life expectancy is longer than 72.
SELECT SUM(Population), GovernmentForm FROM country GROUP BY GovernmentForm HAVING AVG(LifeExpectancy) > 72
CREATE TABLE country (GovernmentForm VARCHAR(255), Population INTEGER, LifeExpectancy INTEGER)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4397 }
Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?
SELECT SUM(Population), AVG(LifeExpectancy), Continent FROM country GROUP BY Continent HAVING AVG(LifeExpectancy) < 72
CREATE TABLE country (Continent VARCHAR(255), Population INTEGER, LifeExpectancy INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
2
{ "split": "train", "row_index": 4398 }
What are the names and areas of countries with the top 5 largest area?
SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5
CREATE TABLE country (Name VARCHAR(255), SurfaceArea VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4399 }
What are names of countries with the top 3 largest population?
SELECT Name FROM country ORDER BY Population DESC LIMIT 3
CREATE TABLE country (Name VARCHAR(255), Population VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4400 }
What are the names of the nations with the 3 lowest populations?
SELECT Name FROM country ORDER BY Population LIMIT 3
CREATE TABLE country (Name VARCHAR(255), Population VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4401 }
how many countries are in Asia?
SELECT COUNT(*) FROM country WHERE continent = 'Asia'
CREATE TABLE country (continent VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT, Name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4402 }
What are the names of the countries that are in the continent of Europe and have a population of 80000?
SELECT Name FROM country WHERE continent = 'Europe' AND Population = '80000'
CREATE TABLE country (Name VARCHAR(255), continent VARCHAR(255), Population VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4403 }
What is the total population and average area of countries in the continent of North America whose area is bigger than 3000 ?
SELECT SUM(population), AVG(surfacearea) FROM country WHERE continent = 'north america' AND surfacearea > 3000
CREATE TABLE country (population INTEGER, surfacearea INTEGER, continent VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
3
{ "split": "train", "row_index": 4404 }
What are the cities whose population is between 160000 and 900000?
SELECT name FROM city WHERE Population BETWEEN 160000 AND 900000
CREATE TABLE city (name VARCHAR(255), Population INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4405 }
Return the names of cities that have a population between 160000 and 900000 .
SELECT name FROM city WHERE population BETWEEN 160000 AND 900000
CREATE TABLE city (name VARCHAR(255), population INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4406 }
Which language is spoken by the largest number of countries?
SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE countrylanguage (LANGUAGE VARCHAR(255), CountryCode VARCHAR(255), Percentage INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 4407 }
What is the language spoken by the largest percentage of people in each country?
SELECT LANGUAGE, CountryCode, MAX(Percentage) FROM countrylanguage GROUP BY CountryCode
CREATE TABLE countrylanguage (LANGUAGE VARCHAR(255), CountryCode VARCHAR(255), Percentage INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4408 }
What is the total number of countries where Spanish is spoken by the largest percentage of people?
SELECT COUNT(*), MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = 'Spanish' GROUP BY CountryCode
CREATE TABLE countrylanguage (Percentage INTEGER, CountryCode VARCHAR(255), LANGUAGE VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
2
{ "split": "train", "row_index": 4409 }
What are the codes of countries where Spanish is spoken by the largest percentage of people?
SELECT CountryCode, MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = 'Spanish' GROUP BY CountryCode
CREATE TABLE countrylanguage (CountryCode VARCHAR(255), Percentage INTEGER, LANGUAGE VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4410 }
How many conductors are there?
SELECT COUNT(*) FROM conductor
CREATE TABLE conductor (Id VARCHAR(255), Name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 4411 }
List the names of conductors in ascending order of age.
SELECT Name FROM conductor ORDER BY Age
CREATE TABLE conductor (Name VARCHAR(255), Age VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4412 }
What are the names of conductors whose nationalities are not "USA"?
SELECT Name FROM conductor WHERE Nationality <> 'USA'
CREATE TABLE conductor (Name VARCHAR(255), Nationality VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4413 }
What are the record companies of orchestras in descending order of years in which they were founded?
SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC
CREATE TABLE orchestra (Record_Company VARCHAR(255), Year_of_Founded VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4414 }
What is the average attendance of shows?
SELECT AVG(Attendance) FROM SHOW
CREATE TABLE SHOW (Attendance INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 4415 }
What are the maximum and minimum share of performances whose type is not "Live final".
SELECT MAX(SHARE), MIN(SHARE) FROM performance WHERE TYPE <> 'Live final'
CREATE TABLE performance (SHARE INTEGER, TYPE VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
2
{ "split": "train", "row_index": 4416 }
How many different nationalities do conductors have?
SELECT COUNT(DISTINCT Nationality) FROM conductor
CREATE TABLE conductor (Nationality VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 4417 }
List names of conductors in descending order of years of work.
SELECT Name FROM conductor ORDER BY Year_of_Work DESC
CREATE TABLE conductor (Name VARCHAR(255), Year_of_Work VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4418 }
List the name of the conductor with the most years of work.
SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1
CREATE TABLE conductor (Name VARCHAR(255), Year_of_Work VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4419 }
Show the names of conductors and the orchestras they have conducted.
SELECT T1.Name, T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID
CREATE TABLE conductor (Name VARCHAR(255), Conductor_ID VARCHAR(255)); CREATE TABLE orchestra (Orchestra VARCHAR(255), Conductor_ID VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4420 }
Show the names of conductors that have conducted more than one orchestras.
SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1
CREATE TABLE orchestra (Conductor_ID VARCHAR(255), Orchestra_ID VARCHAR(255)); CREATE TABLE conductor (Name VARCHAR(255), Conductor_ID VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4421 }
Show the name of the conductor that has conducted the most number of orchestras.
SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE orchestra (Conductor_ID VARCHAR(255), Orchestra_ID VARCHAR(255)); CREATE TABLE conductor (Name VARCHAR(255), Conductor_ID VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
0
{ "split": "train", "row_index": 4422 }
Please show the different record companies and the corresponding number of orchestras.
SELECT Record_Company, COUNT(*) FROM orchestra GROUP BY Record_Company
CREATE TABLE orchestra (Record_Company VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4424 }
Please show the record formats of orchestras in ascending order of count.
SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*)
CREATE TABLE orchestra (Major_Record_Format VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4425 }
List the record company shared by the most number of orchestras.
SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE orchestra (Record_Company VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 4426 }
List the names of orchestras that have no performance.
SELECT Orchestra FROM orchestra WHERE NOT Orchestra_ID IN (SELECT Orchestra_ID FROM performance)
CREATE TABLE orchestra (Orchestra VARCHAR(255), Orchestra_ID VARCHAR(255)); CREATE TABLE performance (Orchestra VARCHAR(255), Orchestra_ID VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 4427 }
Show the record companies shared by orchestras founded before 2003 and after 2003.
SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003
CREATE TABLE orchestra (Record_Company VARCHAR(255), Year_of_Founded INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 4428 }
Find the number of orchestras whose record format is "CD" or "DVD".
SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = 'CD' OR Major_Record_Format = 'DVD'
CREATE TABLE orchestra (Major_Record_Format VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4429 }
How many high schoolers are there?
SELECT COUNT(*) FROM Highschooler
CREATE TABLE Highschooler (Id VARCHAR(255), Name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 4431 }
Show the names and grades of each high schooler.
SELECT name, grade FROM Highschooler
CREATE TABLE Highschooler (name VARCHAR(255), grade VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
1
{ "split": "train", "row_index": 4432 }
Show all the grades of the high schoolers.
SELECT grade FROM Highschooler
CREATE TABLE Highschooler (grade VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 4433 }
What grade is Kyle in?
SELECT grade FROM Highschooler WHERE name = 'Kyle'
CREATE TABLE Highschooler (grade VARCHAR(255), name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4434 }
Show the names of all high schoolers in grade 10.
SELECT name FROM Highschooler WHERE grade = 10
CREATE TABLE Highschooler (name VARCHAR(255), grade VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4435 }
Show the ID of the high schooler named Kyle.
SELECT ID FROM Highschooler WHERE name = 'Kyle'
CREATE TABLE Highschooler (ID VARCHAR(255), name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4436 }
How many high schoolers are there in grade 9 or 10?
SELECT COUNT(*) FROM Highschooler WHERE grade = 9 OR grade = 10
CREATE TABLE Highschooler (grade VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4437 }
Show the number of high schoolers for each grade.
SELECT grade, COUNT(*) FROM Highschooler GROUP BY grade
CREATE TABLE Highschooler (grade VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4438 }
Which grade has the most high schoolers?
SELECT grade FROM Highschooler GROUP BY grade ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Highschooler (grade VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 4439 }
Show me all grades that have at least 4 students.
SELECT grade FROM Highschooler GROUP BY grade HAVING COUNT(*) >= 4
CREATE TABLE Highschooler (grade VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 4440 }
Show the student IDs and numbers of friends corresponding to each.
SELECT student_id, COUNT(*) FROM Friend GROUP BY student_id
CREATE TABLE Friend (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4441 }
Show the names of high school students and their corresponding number of friends.
SELECT T2.name, COUNT(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id
CREATE TABLE Highschooler (name VARCHAR(255), id VARCHAR(255)); CREATE TABLE Friend (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4442 }
What is the name of the high schooler who has the greatest number of friends?
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Highschooler (name VARCHAR(255), id VARCHAR(255)); CREATE TABLE Friend (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
0
{ "split": "train", "row_index": 4443 }
Show the names of high schoolers who have at least 3 friends.
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 3
CREATE TABLE Highschooler (name VARCHAR(255), id VARCHAR(255)); CREATE TABLE Friend (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4444 }
How many friends does the high school student Kyle have?
SELECT COUNT(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = 'Kyle'
CREATE TABLE Friend (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Highschooler (id VARCHAR(255), name VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4446 }
Show ids of all students who do not have any friends.
SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend
CREATE TABLE Highschooler (id VARCHAR(255), student_id VARCHAR(255)); CREATE TABLE Friend (id VARCHAR(255), student_id VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
1
0
{ "split": "train", "row_index": 4447 }
Show the ids of high schoolers who have friends and are also liked by someone else.
SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes
CREATE TABLE Likes (student_id VARCHAR(255), liked_id VARCHAR(255)); CREATE TABLE Friend (student_id VARCHAR(255), liked_id VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
1
0
{ "split": "train", "row_index": 4449 }
Show name of all students who have some friends and also are liked by someone else.
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id
CREATE TABLE Highschooler (name VARCHAR(255), id VARCHAR(255)); CREATE TABLE Likes (student_id VARCHAR(255), liked_id VARCHAR(255)); CREATE TABLE Friend (student_id VARCHAR(255), liked_id VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 4450 }
Count the number of likes for each student id.
SELECT student_id, COUNT(*) FROM Likes GROUP BY student_id
CREATE TABLE Likes (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 4451 }
Show the names of high schoolers who have likes, and numbers of likes for each.
SELECT T2.name, COUNT(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id
CREATE TABLE Likes (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Highschooler (name VARCHAR(255), id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4452 }
What is the name of the high schooler who has the greatest number of likes?
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Likes (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Highschooler (name VARCHAR(255), id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
0
{ "split": "train", "row_index": 4453 }
Show the names of students who have at least 2 likes.
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING COUNT(*) >= 2
CREATE TABLE Likes (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Highschooler (name VARCHAR(255), id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4454 }
Show the names of students who have a grade higher than 5 and have at least 2 friends.
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING COUNT(*) >= 2
CREATE TABLE Friend (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Highschooler (name VARCHAR(255), id VARCHAR(255), grade INTEGER)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 4455 }
How many likes does Kyle have?
SELECT COUNT(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = 'Kyle'
CREATE TABLE Likes (student_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Highschooler (id VARCHAR(255), name VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 4456 }
Which states have both owners and professionals living there?
SELECT state FROM Owners INTERSECT SELECT state FROM Professionals
CREATE TABLE Owners (state VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE Professionals (state VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
1
0
{ "split": "train", "row_index": 4459 }
What is the average age of the dogs who have gone through any treatments?
SELECT AVG(age) FROM Dogs WHERE dog_id IN (SELECT dog_id FROM Treatments)
CREATE TABLE Dogs (age INTEGER, dog_id VARCHAR(255)); CREATE TABLE Treatments (age INTEGER, dog_id VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 4460 }
Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .
SELECT name FROM dogs WHERE NOT dog_id IN (SELECT dog_id FROM treatments GROUP BY dog_id HAVING SUM(cost_of_treatment) > 1000)
CREATE TABLE dogs (name VARCHAR(255), dog_id VARCHAR(255), cost_of_treatment INTEGER); CREATE TABLE treatments (name VARCHAR(255), dog_id VARCHAR(255), cost_of_treatment INTEGER)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 4462 }
Which first names are used for professionals or owners but are not used as dog names?
SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs
CREATE TABLE Owners (first_name VARCHAR(255), name VARCHAR(255)); CREATE TABLE Dogs (first_name VARCHAR(255), name VARCHAR(255)); CREATE TABLE Professionals (first_name VARCHAR(255), name VARCHAR(255))
generic
null
hard
extended
valid
valid
valid
[]
[]
[]
[ "Left-nested set operations cannot be represented faithfully" ]
[ "validated", "extended", "extended" ]
null
null
null
null
{ "split": "train", "row_index": 4463 }
Which professional did not operate any treatment on dogs? List the professional's id, role and email.
SELECT professional_id, role_code, email_address FROM Professionals EXCEPT SELECT T1.professional_id, T1.role_code, T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id
CREATE TABLE Professionals (professional_id VARCHAR(255), role_code VARCHAR(255), email_address VARCHAR(255)); CREATE TABLE Treatments (professional_id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
1
1
{ "split": "train", "row_index": 4464 }
Which owner owns the most dogs? List the owner id, first name and last name.
SELECT T1.owner_id, T2.first_name, T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Owners (first_name VARCHAR(255), last_name VARCHAR(255), owner_id VARCHAR(255)); CREATE TABLE Dogs (owner_id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 4465 }
Which professionals have done at least two treatments? List the professional's id, role, and first name.
SELECT T1.professional_id, T1.role_code, T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2
CREATE TABLE Professionals (professional_id VARCHAR(255), role_code VARCHAR(255), first_name VARCHAR(255)); CREATE TABLE Treatments (professional_id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4466 }
What is the name of the breed with the most dogs?
SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Dogs (breed_code VARCHAR(255)); CREATE TABLE Breeds (breed_name VARCHAR(255), breed_code VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
0
{ "split": "train", "row_index": 4467 }
Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.
SELECT T1.owner_id, T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Owners (owner_id VARCHAR(255), last_name VARCHAR(255)); CREATE TABLE Dogs (owner_id VARCHAR(255), dog_id VARCHAR(255)); CREATE TABLE Treatments (dog_id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
5
0
1
{ "split": "train", "row_index": 4468 }
Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.
SELECT T1.owner_id, T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY SUM(T3.cost_of_treatment) DESC LIMIT 1
CREATE TABLE Treatments (dog_id VARCHAR(255), cost_of_treatment INTEGER); CREATE TABLE Owners (owner_id VARCHAR(255), zip_code VARCHAR(255)); CREATE TABLE Dogs (owner_id VARCHAR(255), dog_id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
5
0
1
{ "split": "train", "row_index": 4470 }
Which professionals have done at least two types of treatments? List the professional id and cell phone.
SELECT T1.professional_id, T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2
CREATE TABLE Professionals (professional_id VARCHAR(255), cell_number VARCHAR(255)); CREATE TABLE Treatments (professional_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 4471 }