nl stringlengths 22 185 | sql stringlengths 22 608 | db_id stringclasses 40
values | table_schema stringclasses 305
values |
|---|---|---|---|
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 | art_1 | [{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}] |
What is the name of the scuplture that was created most recently ? | select title from sculptures order by year desc limit 1 | art_1 | [{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}] |
What is the title and location of the oldest painting ? | select title , location from paintings order by year limit 1 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What is the name of the oldest painting and where is it located? | SELECT title , LOCATION , YEAR FROM paintings ORDER BY YEAR LIMIT 1 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
Find the names of all sculptures located in gallery 226. | SELECT title FROM sculptures WHERE LOCATION = "Gallery 226" | art_1 | [{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}] |
What are the names of all sculptures in gallery 226? | SELECT title FROM sculptures WHERE LOCATION = "Gallery 226" | art_1 | [{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}] |
List the title and location of all paintings. | SELECT title , LOCATION FROM paintings | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What are the paintings called and where are they located? | SELECT title , LOCATION FROM paintings | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
List the title and location of all sculptures. | SELECT title , LOCATION FROM sculptures | art_1 | [{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}] |
What are the sculptures called and where are they located? | SELECT title , LOCATION FROM sculptures | art_1 | [{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}] |
What are the medium types of the painting with id = 80 | SELECT medium FROM paintings WHERE paintingID = 80 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What mediums were used for the painting with id 80 ? | select medium from paintings where paintingid = 80 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
Find the first and last names of all artists who were born after 1850. | SELECT lname , fname FROM artists WHERE birthYear > 1850 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}] |
What are the full names of artists born after 1850? | SELECT lname , fname FROM artists WHERE birthYear > 1850 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}] |
Find the names and years of all sculptures that are not located in gallery 226. | SELECT title , YEAR FROM sculptures WHERE LOCATION != "Gallery 226" | art_1 | [{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}] |
What are the names and dates created for all sculptures not located in gallery 226? | SELECT title , YEAR FROM sculptures WHERE LOCATION != "Gallery 226" | art_1 | [{'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'medium'}, {'col_name': 'location'}, {'col_name': 'sculptor id'}], 'foreign_key_columns': ['sculptor id'], 'primary_keys': ['sculpture id']}] |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}] |
Give the full name of the artist who lived the longest. | SELECT lname , fname FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}] |
What is the age of the artist who had the shortest life? | SELECT deathYear - birthYear FROM artists ORDER BY deathYear - birthYear LIMIT 1 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}] |
How old is the artist who lived the shortest life? | SELECT deathYear - birthYear FROM artists ORDER BY deathYear - birthYear LIMIT 1 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}] |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}] |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}] |
How many paintings are exhibited at gallery 240? | SELECT count(*) FROM paintings WHERE LOCATION = "Gallery 240" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What is the total number of paintings exhibited in gallery 240? | SELECT count(*) FROM paintings WHERE LOCATION = "Gallery 240" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
What are the numbers of works for different medium type? | SELECT count(*) , medium FROM paintings GROUP BY medium | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
How many works are there in each medium? | SELECT count(*) , medium FROM paintings GROUP BY medium | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What are the average height of paintings for different medium types? | SELECT avg(height_mm) , medium FROM paintings GROUP BY medium | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What is the average height of paintings for different medium types? | SELECT avg(height_mm) , medium FROM paintings GROUP BY medium | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What are the numbers of paintings created before 1900 in different places? | SELECT count(*) , LOCATION FROM paintings WHERE YEAR < 1900 GROUP BY LOCATION | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
How many paintings were created before 1900 in different locations? | SELECT count(*) , LOCATION FROM paintings WHERE YEAR < 1900 GROUP BY LOCATION | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
Give the names of all oil paintings created after 1910. | SELECT title FROM paintings WHERE YEAR > 1910 AND medium = "oil" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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") | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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") | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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") | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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") | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
Find the id of the oldest painting. | SELECT paintingID FROM paintings ORDER BY YEAR LIMIT 1 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What is the id of the oldest painting? | SELECT paintingID FROM paintings ORDER BY YEAR LIMIT 1 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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%" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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%" | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
List the names of all distinct paintings in alphabetical order. | SELECT DISTINCT title FROM paintings ORDER BY title | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What is the name of every distinct painting in alphabetical order? | SELECT DISTINCT title FROM paintings ORDER BY title | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
List the names of all distinct paintings ordered by length. | SELECT DISTINCT title FROM paintings ORDER BY height_mm | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
List the names of all distinct paintings from shortest to longest in height. | SELECT DISTINCT title FROM paintings ORDER BY height_mm | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
Which locations have paintings created before 1885 or after 1930? | SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 OR YEAR > 1930 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What locations have works painted before 1885 or after 1930? | SELECT DISTINCT LOCATION FROM paintings WHERE YEAR < 1885 OR YEAR > 1930 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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" | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What are the maximum height and id of paintings painted before 1900? | SELECT max(height_mm) , paintingID FROM paintings WHERE YEAR < 1900 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
What is the height and id of the tallest painting created before 1900? | SELECT max(height_mm) , paintingID FROM paintings WHERE YEAR < 1900 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'co... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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 | art_1 | [{'table_name': 'artists', 'table_schema': [{'col_name': 'artist id'}, {'col_name': 'last name'}, {'col_name': 'first name'}, {'col_name': 'birth year'}, {'col_name': 'death year'}], 'foreign_key_columns': [], 'primary_keys': ['artist id']}, {'table_name': 'sculptures', 'table_schema': [{'col_name': 'sculpture id'}, {'... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
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 | art_1 | [{'table_name': 'paintings', 'table_schema': [{'col_name': 'painting id'}, {'col_name': 'title'}, {'col_name': 'year'}, {'col_name': 'height mm'}, {'col_name': 'width mm'}, {'col_name': 'medium'}, {'col_name': 'medium on'}, {'col_name': 'location'}, {'col_name': 'painter id'}], 'foreign_key_columns': ['painter id'], 'p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.