query_id
int64
0
2.15k
database_id
stringclasses
40 values
table_id
listlengths
1
4
query
stringlengths
22
185
answer
stringlengths
22
608
difficulty
stringclasses
4 values
1,200
art_1
[ "sculptures" ]
What is the title of the sculpture that was created in the most recent year ?
select title from sculptures order by year desc limit 1
medium
1,201
art_1
[ "sculptures" ]
What is the name of the scuplture that was created most recently ?
select title from sculptures order by year desc limit 1
medium
1,202
art_1
[ "paintings" ]
What is the title and location of the oldest painting ?
select title , location from paintings order by year limit 1
medium
1,203
art_1
[ "paintings" ]
What is the name of the oldest painting and where is it located?
SELECT title , LOCATION , YEAR FROM paintings ORDER BY YEAR LIMIT 1
medium
1,204
art_1
[ "sculptures" ]
Find the names of all sculptures located in gallery 226.
SELECT title FROM sculptures WHERE LOCATION = "Gallery 226"
easy
1,205
art_1
[ "sculptures" ]
What are the names of all sculptures in gallery 226?
SELECT title FROM sculptures WHERE LOCATION = "Gallery 226"
easy
1,206
art_1
[ "paintings" ]
List the title and location of all paintings.
SELECT title , LOCATION FROM paintings
medium
1,207
art_1
[ "paintings" ]
What are the paintings called and where are they located?
SELECT title , LOCATION FROM paintings
medium
1,208
art_1
[ "sculptures" ]
List the title and location of all sculptures.
SELECT title , LOCATION FROM sculptures
medium
1,209
art_1
[ "sculptures" ]
What are the sculptures called and where are they located?
SELECT title , LOCATION FROM sculptures
medium
1,210
art_1
[ "paintings" ]
What are the medium types of the painting with id = 80
SELECT medium FROM paintings WHERE paintingID = 80
easy
1,211
art_1
[ "paintings" ]
What mediums were used for the painting with id 80 ?
select medium from paintings where paintingid = 80
easy
1,212
art_1
[ "artists" ]
Find the first and last names of all artists who were born after 1850.
SELECT lname , fname FROM artists WHERE birthYear > 1850
medium
1,213
art_1
[ "artists" ]
What are the full names of artists born after 1850?
SELECT lname , fname FROM artists WHERE birthYear > 1850
medium
1,214
art_1
[ "sculptures" ]
Find the names and years of all sculptures that are not located in gallery 226.
SELECT title , YEAR FROM sculptures WHERE LOCATION != "Gallery 226"
medium
1,215
art_1
[ "sculptures" ]
What are the names and dates created for all sculptures not located in gallery 226?
SELECT title , YEAR FROM sculptures WHERE LOCATION != "Gallery 226"
medium
1,216
art_1
[ "artists", "sculptures" ]
What are the first and last names of all distinct artists who made sculptures before 1900?
SELECT DISTINCT T1.lname , T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID WHERE T2.year < 1900
medium
1,217
art_1
[ "artists", "sculptures" ]
What is the first and last name of each distinct artists who made a sculpture before 1900?
SELECT DISTINCT T1.lname , T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID WHERE T2.year < 1900
medium
1,218
art_1
[ "artists", "sculptures" ]
Find the birth years of all distinct artists who made sculptures after 1920?
SELECT DISTINCT T1.birthYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID WHERE T2.year > 1920
medium
1,219
art_1
[ "artists", "sculptures" ]
What is the birth year of each distinct artists who created sculptures after 1920?
SELECT DISTINCT T1.birthYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID WHERE T2.year > 1920
medium
1,220
art_1
[ "artists" ]
What are the first and last names of the artist who lived the longest?
SELECT lname , fname FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
medium
1,221
art_1
[ "artists" ]
Give the full name of the artist who lived the longest.
SELECT lname , fname FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
medium
1,222
art_1
[ "artists" ]
What is the age of the artist who had the shortest life?
SELECT deathYear - birthYear FROM artists ORDER BY deathYear - birthYear LIMIT 1
medium
1,223
art_1
[ "artists" ]
How old is the artist who lived the shortest life?
SELECT deathYear - birthYear FROM artists ORDER BY deathYear - birthYear LIMIT 1
medium
1,224
art_1
[ "artists" ]
What are the first name and age of the artist who had the longest life?
SELECT fname , deathYear - birthYear FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
medium
1,225
art_1
[ "artists" ]
What is the first name and age of the artist who lived the longest?
SELECT fname , deathYear - birthYear FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
medium
1,226
art_1
[ "paintings" ]
How many paintings are exhibited at gallery 240?
SELECT count(*) FROM paintings WHERE LOCATION = "Gallery 240"
easy
1,227
art_1
[ "paintings" ]
What is the total number of paintings exhibited in gallery 240?
SELECT count(*) FROM paintings WHERE LOCATION = "Gallery 240"
easy
1,228
art_1
[ "artists", "paintings" ]
How many paintings did the artist with the longest life make ?
select count(*) from artists as t1 join paintings as t2 on t1.artistid = t2.painterid group by t2.painterid order by t1.deathyear - t1.birthyear desc limit 1
extra
1,229
art_1
[ "artists", "paintings" ]
What is the painting count of the artist with the longest life ?
select count(*) from artists as t1 join paintings as t2 on t1.artistid = t2.painterid group by t2.painterid order by t1.deathyear - t1.birthyear desc limit 1
extra
1,230
art_1
[ "artists", "paintings" ]
Give me a list of names and years of paintings that were created by the artist whose first name is Mary.
SELECT T2.title , T2.year FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.fname = "Mary"
medium
1,231
art_1
[ "artists", "paintings" ]
What is the name and year of each painting created by the artist whose first name is Mary?
SELECT T2.title , T2.year FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.fname = "Mary"
medium
1,232
art_1
[ "artists", "paintings" ]
What are the widths of the paintings that were created by the artist who was born before 1850?
SELECT T2.width_mm FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.birthYear < 1850
medium
1,233
art_1
[ "artists", "paintings" ]
How wide were the paintings by the artist who was born prior to 1850?
SELECT T2.width_mm FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.birthYear < 1850
medium
1,234
art_1
[ "artists", "paintings" ]
What are the location and medium type of paintings that are created by the artist whose first name is Pablo?
SELECT T2.location , T2.medium FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.fname = "Pablo"
medium
1,235
art_1
[ "artists", "paintings" ]
In what locations and on what mediums are the paintings created by the artist with the first name Pablo?
SELECT T2.location , T2.medium FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.fname = "Pablo"
medium
1,236
art_1
[ "artists", "paintings", "sculptures" ]
Find the first and last names of the artists who have both works of paintings and sculptures?
SELECT T1.lname , T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID INTERSECT SELECT T3.lname , T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID = T4.painterID
extra
1,237
art_1
[ "artists", "paintings", "sculptures" ]
Give the full names of artists who have created paintings and sculptures.
SELECT T1.lname , T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID INTERSECT SELECT T3.lname , T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID = T4.painterID
extra
1,238
art_1
[ "artists", "paintings" ]
What are the first and last names of the artists who have not only medium oil paintings but also paintings with the lithographic medium?
SELECT T1.lname , T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.medium = "oil" INTERSECT SELECT T3.lname , T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID = T4.painterID WHERE T4.medium = "lithograph"
extra
1,239
art_1
[ "artists", "paintings" ]
What are the first and last names of artists who have painted using both oil and lithographic mediums?
SELECT T1.lname , T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.medium = "oil" INTERSECT SELECT T3.lname , T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID = T4.painterID WHERE T4.medium = "lithograph"
extra
1,240
art_1
[ "artists", "paintings" ]
What is the birth year of the artist who created a painting in 1884 that is on canvas?
SELECT T1.birthYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.year = 1884 AND mediumOn = "canvas"
medium
1,241
art_1
[ "artists", "paintings" ]
In what year was the artist who created a painting in 1884 born?
SELECT T1.birthYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.year = 1884 AND mediumOn = "canvas"
medium
1,242
art_1
[ "artists", "paintings" ]
What are the unique first names of the artists who had medium oil paintings located in gallery 241?
SELECT DISTINCT T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.medium = "oil" AND LOCATION = "Gallery 241"
medium
1,243
art_1
[ "artists", "paintings" ]
What are first names of the artists with oil paintings in gallery 241?
SELECT DISTINCT T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.medium = "oil" AND LOCATION = "Gallery 241"
medium
1,244
art_1
[ "paintings" ]
What are the numbers of works for different medium type?
SELECT count(*) , medium FROM paintings GROUP BY medium
medium
1,245
art_1
[ "paintings" ]
How many works are there in each medium?
SELECT count(*) , medium FROM paintings GROUP BY medium
medium
1,246
art_1
[ "paintings" ]
What are the average height of paintings for different medium types?
SELECT avg(height_mm) , medium FROM paintings GROUP BY medium
medium
1,247
art_1
[ "paintings" ]
What is the average height of paintings for different medium types?
SELECT avg(height_mm) , medium FROM paintings GROUP BY medium
medium
1,248
art_1
[ "paintings" ]
What are the numbers of paintings created before 1900 in different places?
SELECT count(*) , LOCATION FROM paintings WHERE YEAR < 1900 GROUP BY LOCATION
medium
1,249
art_1
[ "paintings" ]
How many paintings were created before 1900 in different locations?
SELECT count(*) , LOCATION FROM paintings WHERE YEAR < 1900 GROUP BY LOCATION
medium
1,250
art_1
[ "paintings" ]
What are the titles of paintings that are created after 1910 and whose medium is oil?
SELECT title FROM paintings WHERE YEAR > 1910 AND medium = "oil"
medium
1,251
art_1
[ "paintings" ]
Give the names of all oil paintings created after 1910.
SELECT title FROM paintings WHERE YEAR > 1910 AND medium = "oil"
medium
1,252
art_1
[ "paintings" ]
Find the unique id of the painters who had medium oil paintings exhibited at gallery 240?
SELECT DISTINCT painterID FROM paintings WHERE medium = "oil" AND LOCATION = "Gallery 240"
medium
1,253
art_1
[ "paintings" ]
What is the unique id of every painter who had a medium oil painting displayed at gallery 240?
SELECT DISTINCT painterID FROM paintings WHERE medium = "oil" AND LOCATION = "Gallery 240"
medium
1,254
art_1
[ "paintings" ]
Find the distinct titles of all the paintings that have a longer height than some painting on canvas?
SELECT DISTINCT title FROM paintings WHERE height_mm > (SELECT min(height_mm) FROM paintings WHERE mediumOn = "canvas")
hard
1,255
art_1
[ "paintings" ]
What are the distinct titles of every painting that has a greater height than some painting on canvas?
SELECT DISTINCT title FROM paintings WHERE height_mm > (SELECT min(height_mm) FROM paintings WHERE mediumOn = "canvas")
hard
1,256
art_1
[ "paintings" ]
Find the distinct ids of all paintings that are older than some painting at location gallery 240.
SELECT paintingID FROM paintings WHERE YEAR < (SELECT max(YEAR) FROM paintings WHERE LOCATION = "Gallery 240")
hard
1,257
art_1
[ "paintings" ]
What are the distinct ids of every painting that is older than some painting in gallery 240?
SELECT paintingID FROM paintings WHERE YEAR < (SELECT max(YEAR) FROM paintings WHERE LOCATION = "Gallery 240")
hard
1,258
art_1
[ "paintings" ]
Find the id of the oldest painting.
SELECT paintingID FROM paintings ORDER BY YEAR LIMIT 1
medium
1,259
art_1
[ "paintings" ]
What is the id of the oldest painting?
SELECT paintingID FROM paintings ORDER BY YEAR LIMIT 1
medium
1,260
art_1
[ "artists", "sculptures" ]
What are the first and last name of the artist who had a sculpture work whose title has the word “female” in it?
SELECT T1.lname , T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID WHERE T2.title LIKE "%female%"
hard
1,261
art_1
[ "artists", "sculptures" ]
What is the full name of the artist with a sculpture whose title includes the word "female"?
SELECT T1.lname , T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID WHERE T2.title LIKE "%female%"
hard
1,262
art_1
[ "paintings" ]
List the names of all distinct paintings in alphabetical order.
SELECT DISTINCT title FROM paintings ORDER BY title
easy
1,263
art_1
[ "paintings" ]
What is the name of every distinct painting in alphabetical order?
SELECT DISTINCT title FROM paintings ORDER BY title
easy
1,264
art_1
[ "paintings" ]
List the names of all distinct paintings ordered by length.
SELECT DISTINCT title FROM paintings ORDER BY height_mm
easy
1,265
art_1
[ "paintings" ]
List the names of all distinct paintings from shortest to longest in height.
SELECT DISTINCT title FROM paintings ORDER BY height_mm
easy
1,266
art_1
[ "paintings", "sculptures" ]
What are the names of both paintings and sculptures created between 1900 and 1950?
SELECT title FROM paintings WHERE YEAR BETWEEN 1900 AND 1950 UNION SELECT title FROM sculptures WHERE YEAR BETWEEN 1900 AND 1950
hard
1,267
art_1
[ "paintings", "sculptures" ]
What are the names of paintings and scupltures created between 1900 and 1950?
SELECT title FROM paintings WHERE YEAR BETWEEN 1900 AND 1950 UNION SELECT title FROM sculptures WHERE YEAR BETWEEN 1900 AND 1950
hard
1,268
art_1
[ "artists", "paintings", "sculptures" ]
Find the titles of paintings and sculpture works made by the artist whose id is 222?
SELECT T2.title FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.artistID = 222 UNION SELECT T4.title FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID = T4.sculptorID WHERE T3.artistID = 222
extra
1,269
art_1
[ "artists", "paintings", "sculptures" ]
What are the titles of all paintings and sculpture works made by the artist whose id is 222?
SELECT T2.title FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.artistID = 222 UNION SELECT T4.title FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID = T4.sculptorID WHERE T3.artistID = 222
extra
1,270
art_1
[ "artists", "paintings" ]
What is the id of the artist who has the highest number of painting works before 1900?
SELECT T1.artistID FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.year < 1900 GROUP BY T1.artistID ORDER BY count(*) DESC LIMIT 1
extra
1,271
art_1
[ "artists", "paintings" ]
What is the id of the artist with the most paintings before 1900?
SELECT T1.artistID FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T2.year < 1900 GROUP BY T1.artistID ORDER BY count(*) DESC LIMIT 1
extra
1,272
art_1
[ "artists", "sculptures" ]
What is the first name of the artist who has the highest number of sculptures?
SELECT T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) DESC LIMIT 1
extra
1,273
art_1
[ "artists", "sculptures" ]
What is the first name of the sculptor with the greatest number of works?
SELECT T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) DESC LIMIT 1
extra
1,274
art_1
[ "paintings" ]
What are the names of paintings whose width is less than 600 or height is larger than 800?
SELECT title FROM paintings WHERE width_mm < 600 OR height_mm > 800
medium
1,275
art_1
[ "paintings" ]
What are the titles of paintings that have a width less than 600 or a height taller taller than 800?
SELECT title FROM paintings WHERE width_mm < 600 OR height_mm > 800
medium
1,276
art_1
[ "paintings" ]
Which locations have paintings created before 1885 or after 1930?
SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 OR YEAR > 1930
medium
1,277
art_1
[ "paintings" ]
What locations have works painted before 1885 or after 1930?
SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 OR YEAR > 1930
medium
1,278
art_1
[ "paintings" ]
Find the ids of paintings whose height is bigger than 500 and less than 2000?
SELECT paintingID FROM paintings WHERE height_mm > 500 AND height_mm < 2000
medium
1,279
art_1
[ "paintings" ]
What are the ids of paintings that are taller than 500 and shorter than 2000?
SELECT paintingID FROM paintings WHERE height_mm > 500 AND height_mm < 2000
medium
1,280
art_1
[ "paintings" ]
Which locations have paintings in the mediums of on panel and on canvas?
SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn = "panel" INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn = "canvas"
hard
1,281
art_1
[ "paintings" ]
What are the locations that have paintings in the mediums of on panels and on canvas?
SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn = "panel" INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn = "canvas"
hard
1,282
art_1
[ "paintings" ]
Find the locations that have paintings created before 1885 and after 1930?
SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE YEAR > 1930
hard
1,283
art_1
[ "paintings" ]
What are the locations that have works painted before 1885 and after 1930?
SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE YEAR > 1930
hard
1,284
art_1
[ "paintings" ]
What are the average height and width of paintings that are oil medium in the place of gallery 241?
SELECT avg(height_mm) , avg(width_mm) FROM paintings WHERE medium = "oil" AND LOCATION = "Gallery 241"
hard
1,285
art_1
[ "paintings" ]
What is the average height and width of paintings that are oil medium in gallery 241?
SELECT avg(height_mm) , avg(width_mm) FROM paintings WHERE medium = "oil" AND LOCATION = "Gallery 241"
hard
1,286
art_1
[ "paintings" ]
What are the maximum height and id of paintings painted before 1900?
SELECT max(height_mm) , paintingID FROM paintings WHERE YEAR < 1900
medium
1,287
art_1
[ "paintings" ]
What is the height and id of the tallest painting created before 1900?
SELECT max(height_mm) , paintingID FROM paintings WHERE YEAR < 1900
medium
1,288
art_1
[ "paintings" ]
What are the maximum height and width of paintings for each year?
SELECT max(height_mm) , max(width_mm) , YEAR FROM paintings GROUP BY YEAR ORDER BY YEAR
extra
1,289
art_1
[ "paintings" ]
What are largest height and width dimensions for paintings in each year?
SELECT max(height_mm) , max(width_mm) , YEAR FROM paintings GROUP BY YEAR ORDER BY YEAR
extra
1,290
art_1
[ "paintings" ]
What are the average height and width of paintings grouped by painters and ordered by name?
SELECT avg(height_mm) , avg(width_mm) , painterID FROM paintings GROUP BY painterID ORDER BY title
extra
1,291
art_1
[ "paintings" ]
Find the average height and width of paintings grouped by painters and ordered by name
SELECT avg(height_mm) , avg(width_mm) , painterID FROM paintings GROUP BY painterID ORDER BY title
extra
1,292
art_1
[ "artists", "paintings" ]
Find the first names and number of works of all artists who have at least two paintings?
SELECT T1.fname , count(*) FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID GROUP BY T2.painterID HAVING count(*) >= 2
medium
1,293
art_1
[ "artists", "paintings" ]
What are the first names of all artists who have at least two paintings, and how many works did each create?
SELECT T1.fname , count(*) FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID GROUP BY T2.painterID HAVING count(*) >= 2
medium
1,294
art_1
[ "artists", "paintings" ]
Find the death year of all artists who have at most 3 paintings?
SELECT T1.deathYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID GROUP BY T2.painterID HAVING count(*) <= 3
medium
1,295
art_1
[ "artists", "paintings" ]
When did each artist who created less than 4 paintings die ?
select t1.deathyear from artists as t1 join paintings as t2 on t1.artistid = t2.painterid group by t2.painterid having count(*) < 4
medium
1,296
art_1
[ "artists", "sculptures" ]
Find the death year of the artist who made the least number of sculptures?
SELECT T1.deathYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) LIMIT 1
extra
1,297
art_1
[ "artists", "sculptures" ]
When did the artist who made the fewest sculptures die?
SELECT T1.deathYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) LIMIT 1
extra
1,298
art_1
[ "paintings" ]
What are the id and height of the painting with the longest width in gallery 240?
SELECT paintingID , height_mm FROM paintings WHERE LOCATION = 'Gallery 240' ORDER BY width_mm DESC LIMIT 1
hard
1,299
art_1
[ "paintings" ]
Tell me the height and id number of the widest painting in gallery 240.
SELECT paintingID , height_mm FROM paintings WHERE LOCATION = 'Gallery 240' ORDER BY width_mm DESC LIMIT 1
hard