target-benchmark/spider-queries huggingface dataset:
Database: pilot_1 (tables: pilotskills)
Question: Count the number of planes Smith owns.
SQL: SELECT count(plane_name) FROM pilotskills WHERE pilot_name  =  'Smith'
Database: pilot_1 (tables: pilotskills)
Question: How many planes are controlled by the pilots whose age is older than 40?
SQL: SELECT count(plane_name) FROM pilotskills WHERE age  >  40
Database: pilot_1 (tables: pilotskills)
Question: Count the number of planes flown by pilots older than 40.
SQL: SELECT count(plane_name) FROM pilotskills WHERE age  >  40
Database: pilot_1 (tables: pilotskills)
Question: Find the names of all pilots with age between 30 and 40 sorted by their ages in ascending order.
SQL: SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age
Database: pilot_1 (tables: pilotskills)
Question: What are the names of pilots between the ages of 30 and 40, ordered by age ascending?
SQL: SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age
Database: pilot_1 (tables: pilotskills)
Question: List all pilot names sorted by their ages in the descending order.
SQL: SELECT pilot_name FROM pilotskills ORDER BY age DESC
Database: pilot_1 (tables: pilotskills)
Question: What are the names of pilots, ordered by age descending?
SQL: SELECT pilot_name FROM pilotskills ORDER BY age DESC
Database: pilot_1 (tables: hangar)
Question: Find all locations of planes sorted by the plane name.
SQL: SELECT LOCATION FROM hangar ORDER BY plane_name
Database: pilot_1 (tables: hangar)
Question: What are the locations of the different planes, ordered by plane name?
SQL: SELECT LOCATION FROM hangar ORDER BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: List all distinct types of planes owned by all pilots in alphabetic order?
SQL: SELECT DISTINCT plane_name FROM pilotskills ORDER BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: What are the different plane names, ordered alphabetically?
SQL: SELECT DISTINCT plane_name FROM pilotskills ORDER BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: How many pilots who are older than 40 or younger than 30?
SQL: SELECT count(pilot_name) FROM pilotskills ORDER BY age  >  40 OR age  <  30
Database: pilot_1 (tables: pilotskills)
Question: Count the number of pilots with age greater than 40 or less than 30.
SQL: SELECT count(pilot_name) FROM pilotskills ORDER BY age  >  40 OR age  <  30
Database: pilot_1 (tables: pilotskills)
Question: What are the names and ages of pilots who own plane Piper Cub and are older than 35, or have F-14 Fighter and are younger than 30?
SQL: SELECT pilot_name ,  age FROM pilotskills WHERE plane_name  =  'Piper Cub' AND age  >  35 UNION SELECT pilot_name ,  age FROM pilotskills WHERE plane_name  =  'F-14 Fighter' AND age  <  30
Database: pilot_1 (tables: pilotskills)
Question: Return the names and ages of pilors who have flown Piper Cub and are older than 35, or have flown the F-14 Fighter and are younger than 30.
SQL: SELECT pilot_name ,  age FROM pilotskills WHERE plane_name  =  'Piper Cub' AND age  >  35 UNION SELECT pilot_name ,  age FROM pilotskills WHERE plane_name  =  'F-14 Fighter' AND age  <  30
Database: pilot_1 (tables: pilotskills)
Question: Find pilots who own plane Piper Cub but not B-52 Bomber.
SQL: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name  =  'B-52 Bomber'
Database: pilot_1 (tables: pilotskills)
Question: What are the names of pilots who have flown Piper Cub but not the B-52 Bomber?
SQL: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name  =  'B-52 Bomber'
Database: pilot_1 (tables: pilotskills)
Question: Find pilots who own planes Piper Cub and B-52 Bomber.
SQL: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' INTERSECT SELECT pilot_name FROM pilotskills WHERE plane_name  =  'B-52 Bomber'
Database: pilot_1 (tables: pilotskills)
Question: What are the names of pilots who own both Piper Cub and the B-52 Bomber?
SQL: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' INTERSECT SELECT pilot_name FROM pilotskills WHERE plane_name  =  'B-52 Bomber'
Database: pilot_1 (tables: pilotskills)
Question: What are the average and smallest ages of all pilots?
SQL: SELECT avg(age) ,  min(age) FROM pilotskills
Database: pilot_1 (tables: pilotskills)
Question: Return the average and minimum ages across all pilots.
SQL: SELECT avg(age) ,  min(age) FROM pilotskills
Database: pilot_1 (tables: pilotskills, hangar)
Question: What are the names of pilots who have planes in both Austin and Boston?
SQL: SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  "Austin" INTERSECT SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.LOCATION  =  "Boston"
Database: pilot_1 (tables: pilotskills, hangar)
Question: Give the names of pilots who have planes in Austin and Boston.
SQL: SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  "Austin" INTERSECT SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.LOCATION  =  "Boston"
Database: pilot_1 (tables: pilotskills)
Question: Find the pilots who have either plane Piper Cub or plane F-14 Fighter.
SQL: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' OR plane_name  =  'F-14 Fighter'
Database: pilot_1 (tables: pilotskills)
Question: What are the names of pilots who have either the Piper Cub or the F-14 Fighter?
SQL: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' OR plane_name  =  'F-14 Fighter'
Database: pilot_1 (tables: pilotskills)
Question: What is the average age of pilots for different types of planes?
SQL: SELECT avg(age) ,  plane_name FROM pilotskills GROUP BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: Return the average age of pilots for each plane name.
SQL: SELECT avg(age) ,  plane_name FROM pilotskills GROUP BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: Find the number of planes for each type.
SQL: SELECT count(*) ,  plane_name FROM pilotskills GROUP BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: Count the number of entries for each plane name.
SQL: SELECT count(*) ,  plane_name FROM pilotskills GROUP BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: Find the name of the oldest pilot for each type of plane, and order the results by plane name.
SQL: SELECT pilot_name ,  plane_name ,  max(age) FROM pilotskills GROUP BY plane_name ORDER BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: What are the different plane names, and what are the names of the oldest pilot who has each, ordered by plane name?
SQL: SELECT pilot_name ,  plane_name ,  max(age) FROM pilotskills GROUP BY plane_name ORDER BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: What are the names of oldest pilots for each type of plane?
SQL: SELECT pilot_name ,  plane_name ,  max(age) FROM pilotskills GROUP BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: Return the names of the different planes, as well as the names of the oldest pilots who flew each.
SQL: SELECT pilot_name ,  plane_name ,  max(age) FROM pilotskills GROUP BY plane_name
Database: pilot_1 (tables: pilotskills)
Question: Find the max age for each group of pilots with the same name.
SQL: SELECT max(age) ,  pilot_name FROM pilotskills GROUP BY pilot_name
Database: pilot_1 (tables: pilotskills)
Question: What are the different pilot names, and what are the maximum ages of pilots for each?
SQL: SELECT max(age) ,  pilot_name FROM pilotskills GROUP BY pilot_name
Database: pilot_1 (tables: pilotskills, hangar)
Question: For each city, find the number and average age of pilots who have a plane.
SQL: SELECT count(T1.pilot_name) ,  avg(T1.age) ,  T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name GROUP BY T2.location
Database: pilot_1 (tables: pilotskills, hangar)
Question: What are the different hangar locations and how many pilots correspond to each. Also, what are their average ages?
SQL: SELECT count(T1.pilot_name) ,  avg(T1.age) ,  T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name GROUP BY T2.location
Database: pilot_1 (tables: pilotskills)
Question: Find the number of pilots for the plane types with average pilot age below 35.
SQL: SELECT count(*) ,  plane_name FROM pilotskills GROUP BY plane_name HAVING avg(age)  <  35
Database: pilot_1 (tables: pilotskills)
Question: What are the different plane names of planes with an average pilot age of below 35, and how many pilots have flown each of them?
SQL: SELECT count(*) ,  plane_name FROM pilotskills GROUP BY plane_name HAVING avg(age)  <  35
Database: pilot_1 (tables: pilotskills, hangar)
Question: Find the location of the plane that is owned by the youngest pilot.
SQL: SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T1.age  =  (SELECT min(age) FROM pilotskills)
Database: pilot_1 (tables: pilotskills, hangar)
Question: What is the location of the plane that was flown by the pilot with the lowest age?
SQL: SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T1.age  =  (SELECT min(age) FROM pilotskills)
Database: pilot_1 (tables: pilotskills, hangar)
Question: Find the name and age of pilots who have a plane in Austin.
SQL: SELECT T1.pilot_name ,  T1.age FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  "Austin"
Database: pilot_1 (tables: pilotskills, hangar)
Question: What are the names and ages of pilots who have planes located in Austin?
SQL: SELECT T1.pilot_name ,  T1.age FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  "Austin"
Database: pilot_1 (tables: pilotskills)
Question: List in alphabetic order the names of pilots whose age is greater than some pilots having plane Piper Cub.
SQL: SELECT pilot_name FROM pilotskills WHERE age  >  (SELECT min(age) FROM pilotskills WHERE plane_name  =  'Piper Cub') ORDER BY pilot_name
Database: pilot_1 (tables: pilotskills)
Question: Return the names of pilots who are older than any pilot who has flown Piper Cub, ordered alphabetically.
SQL: SELECT pilot_name FROM pilotskills WHERE age  >  (SELECT min(age) FROM pilotskills WHERE plane_name  =  'Piper Cub') ORDER BY pilot_name
Database: pilot_1 (tables: pilotskills)
Question: Find the number of pilots whose age is younger than all pilots whose plane is F-14 Fighter.
SQL: SELECT count(*) FROM pilotskills WHERE age  <  (SELECT min(age) FROM pilotskills WHERE plane_name  =  'F-14 Fighter')
Database: pilot_1 (tables: pilotskills)
Question: How many pilots are younger than all pilots who own the F-14 Fighter?
SQL: SELECT count(*) FROM pilotskills WHERE age  <  (SELECT min(age) FROM pilotskills WHERE plane_name  =  'F-14 Fighter')
Database: pilot_1 (tables: pilotskills)
Question: Find all different planes whose names contain substring 'Bomber'.
SQL: SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%'
Database: pilot_1 (tables: pilotskills)
Question: What are the different plane names that contain the word Bomber?
SQL: SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%'
Database: pilot_1 (tables: pilotskills)
Question: Find the number of all pilots whose age is older than some pilot who has plane Piper Cub.
SQL: SELECT count(pilot_name) FROM pilotskills WHERE age  >  (SELECT min(age) FROM pilotskills WHERE plane_name  =  'Piper Cub')
Database: pilot_1 (tables: pilotskills)
Question: How many pilots are older than the youngest pilot who has Piper Cub?
SQL: SELECT count(pilot_name) FROM pilotskills WHERE age  >  (SELECT min(age) FROM pilotskills WHERE plane_name  =  'Piper Cub')
Database: district_spokesman (tables: district)
Question: Find the name of the district which has the largest area.
SQL: SELECT name FROM district ORDER BY Area_km DESC LIMIT 1
Database: district_spokesman (tables: district)
Question: Select the area and government website of the district with the smallest population.
SQL: SELECT area_km ,  Government_website FROM district ORDER BY Population LIMIT 1
Database: district_spokesman (tables: district)
Question: Find the names and populations of the districts whose area is greater than the average area.
SQL: SELECT name ,  population FROM district WHERE area_km  >  (SELECT avg(area_km) FROM district)
Database: district_spokesman (tables: district)
Question: Give me the biggest and average areas of all districts.
SQL: SELECT max(area_km) ,  avg(area_km) FROM district
Database: district_spokesman (tables: district)
Question: What is the total population of the districts whose areas are in the top 3?
SQL: SELECT sum(population) FROM district ORDER BY area_km DESC LIMIT 3
Database: district_spokesman (tables: district)
Question: List the ids, names, and government websites of all districts sorted by population.
SQL: SELECT name ,  Government_website ,  district_id FROM district ORDER BY Population
Database: district_spokesman (tables: district)
Question: Find the names of districts whose government links use a 'gov' domain.
SQL: SELECT name FROM district WHERE Government_website LIKE "%gov%"
Database: district_spokesman (tables: district)
Question: Return the ids and names of the districts whose population is larger than 4000 or area bigger than 3000.
SQL: SELECT district_id ,  name FROM district WHERE area_km  >  3000 OR population  >  4000
Database: district_spokesman (tables: spokesman)
Question: Find all spokesman's names and speech titles.
SQL: SELECT name ,  speach_title FROM spokesman
Database: district_spokesman (tables: spokesman)
Question: Find the average points and average ages of all spokesmen whose rank position is 1.
SQL: SELECT avg(points) ,  avg(age) FROM spokesman WHERE rank_position  =  1
Database: district_spokesman (tables: spokesman)
Question: What are the names and points of spokesmen who are younger than 40?
SQL: SELECT name ,  points FROM spokesman WHERE age  <  40
Database: district_spokesman (tables: spokesman)
Question: Who is the oldest spokesman?
SQL: SELECT name FROM spokesman ORDER BY age DESC LIMIT 1
Database: district_spokesman (tables: spokesman)
Question: Which spokesman has lower points than the average?
SQL: SELECT name FROM spokesman WHERE points  <  (SELECT avg(points) FROM spokesman)
Database: district_spokesman (tables: spokesman_district, district)
Question: Find the name of the district which has greatest number of spokesmen.
SQL: SELECT t1.name FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID  =  t2.District_ID GROUP BY t2.District_ID ORDER BY count(*) DESC LIMIT 1
Database: district_spokesman (tables: spokesman_district, spokesman)
Question: Find the names of spokesmen who have served some district before 2004.
SQL: SELECT t1.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID  =  t2.Spokesman_ID WHERE t2.start_year  <  2004
Database: district_spokesman (tables: spokesman_district, district)
Question: Find the number of spokesmen for each district, and the show district names as well.
SQL: SELECT t1.name ,  count(*) FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID  =  t2.District_ID GROUP BY t2.District_ID
Database: district_spokesman (tables: spokesman_district, spokesman, district)
Question: Find the names of the districts which have had both spokesman with rank position 1 and 2.
SQL: SELECT t3.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID  =  t2.Spokesman_ID JOIN district AS t3 ON t3.district_id  =  t2.district_id WHERE t1.rank_position  =  1 INTERSECT SELECT t3.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID  =  t2.Spokesman_ID JOIN district AS t3 ON t3.district_id  =  t2.district_id WHERE t1.rank_position  =  2
Database: district_spokesman (tables: spokesman_district, district)
Question: Find the names of districts which have more than one spokesman.
SQL: SELECT t1.name FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID  =  t2.District_ID GROUP BY t2.District_ID HAVING count(*)  >  1
Database: district_spokesman (tables: spokesman_district, district)
Question: Find the number of districts which have no spokesmen.
SQL: SELECT count(*) FROM district WHERE district_id NOT IN (SELECT district_id FROM spokesman_district)
Database: district_spokesman (tables: spokesman_district, spokesman)
Question: Find the name of spokesmen who do not speak for any district.
SQL: SELECT name FROM spokesman WHERE Spokesman_ID NOT IN (SELECT Spokesman_ID FROM spokesman_district)
Database: district_spokesman (tables: spokesman_district, district)
Question: Find the total and average population of the districts which have some spokesman.
SQL: SELECT sum(population) ,  avg(population) FROM district WHERE district_id IN (SELECT district_id FROM spokesman_district)
Database: art_1 (tables: sculptures)
Question: What is the title of the sculpture that was created in the most recent year ?
SQL: select title from sculptures order by year desc limit 1
Database: art_1 (tables: sculptures)
Question: What is the name of the scuplture that was created most recently ?
SQL: select title from sculptures order by year desc limit 1
Database: art_1 (tables: paintings)
Question: What is the title and location of the oldest painting ?
SQL: select title ,  location from paintings order by year limit 1
Database: art_1 (tables: paintings)
Question: What is the name of the oldest painting and where is it located?
SQL: SELECT title ,  LOCATION ,  YEAR FROM paintings ORDER BY YEAR LIMIT 1
Database: art_1 (tables: sculptures)
Question: Find the names of all sculptures located in gallery 226.
SQL: SELECT title FROM sculptures WHERE LOCATION  =  "Gallery 226"
Database: art_1 (tables: sculptures)
Question: What are the names of all sculptures in gallery 226?
SQL: SELECT title FROM sculptures WHERE LOCATION  =  "Gallery 226"
Database: art_1 (tables: paintings)
Question: List the title and location of all paintings.
SQL: SELECT title ,  LOCATION FROM paintings
Database: art_1 (tables: paintings)
Question: What are the paintings called and where are they located?
SQL: SELECT title ,  LOCATION FROM paintings
Database: art_1 (tables: sculptures)
Question: List the title and location of all sculptures.
SQL: SELECT title ,  LOCATION FROM sculptures
Database: art_1 (tables: sculptures)
Question: What are the sculptures called and where are they located?
SQL: SELECT title ,  LOCATION FROM sculptures
Database: art_1 (tables: paintings)
Question: What are the medium types of the painting with id = 80
SQL: SELECT medium FROM paintings WHERE paintingID  =  80
Database: art_1 (tables: paintings)
Question: What mediums were used for the painting with id 80 ?
SQL: select medium from paintings where paintingid  =  80
Database: art_1 (tables: artists)
Question: Find the first and last names of all artists who were born after 1850.
SQL: SELECT lname ,  fname FROM artists WHERE birthYear  >  1850
Database: art_1 (tables: artists)
Question: What are the full names of artists born after 1850?
SQL: SELECT lname ,  fname FROM artists WHERE birthYear  >  1850
Database: art_1 (tables: sculptures)
Question: Find the names and years of all sculptures that are not located in gallery 226.
SQL: SELECT title ,  YEAR FROM sculptures WHERE LOCATION != "Gallery 226"
Database: art_1 (tables: sculptures)
Question: What are the names and dates created for all sculptures not located in gallery 226?
SQL: SELECT title ,  YEAR FROM sculptures WHERE LOCATION != "Gallery 226"
Database: art_1 (tables: artists, sculptures)
Question: What are the first and last names of all distinct artists who made sculptures before 1900?
SQL: SELECT DISTINCT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.year  <  1900
Database: art_1 (tables: artists, sculptures)
Question: What is the first and last name of each distinct artists who made a sculpture before 1900?
SQL: SELECT DISTINCT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.year  <  1900
Database: art_1 (tables: artists, sculptures)
Question: Find the birth years of all distinct artists who made sculptures after 1920?
SQL: SELECT DISTINCT T1.birthYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.year  >  1920
Database: art_1 (tables: artists, sculptures)
Question: What is the birth year of each distinct artists who created sculptures after 1920?
SQL: SELECT DISTINCT T1.birthYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.year  >  1920
Database: art_1 (tables: artists)
Question: What are the first and last names of the artist who lived the longest?
SQL: SELECT lname ,  fname FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
Database: art_1 (tables: artists)
Question: Give the full name of the artist who lived the longest.
SQL: SELECT lname ,  fname FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
Database: art_1 (tables: artists)
Question: What is the age of the artist who had the shortest life?
SQL: SELECT deathYear - birthYear FROM artists ORDER BY deathYear - birthYear LIMIT 1
Database: art_1 (tables: artists)
Question: How old is the artist who lived the shortest life?
SQL: SELECT deathYear - birthYear FROM artists ORDER BY deathYear - birthYear LIMIT 1
Database: art_1 (tables: artists)
Question: What are the first name and age of the artist who had the longest life?
SQL: SELECT fname  ,  deathYear - birthYear FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
Database: art_1 (tables: artists)
Question: What is the first name and age of the artist who lived the longest?
SQL: SELECT fname  ,  deathYear - birthYear FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1
Database: art_1 (tables: paintings)
Question: How many paintings are exhibited at gallery 240?
SQL: SELECT count(*) FROM paintings WHERE LOCATION  =  "Gallery 240"
Database: art_1 (tables: paintings)
Question: What is the total number of paintings exhibited in gallery 240?
SQL: SELECT count(*) FROM paintings WHERE LOCATION  =  "Gallery 240"
Database: art_1 (tables: artists, paintings)
Question: How many paintings did the artist with the longest life make ?
SQL: 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
Database: art_1 (tables: artists, paintings)
Question: What is the painting count of the artist with the longest life ?
SQL: 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
Database: art_1 (tables: artists, paintings)
Question: Give me a list of names and years of paintings that were created by the artist whose first name is Mary.
SQL: SELECT T2.title ,   T2.year FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.fname  =  "Mary"
Database: art_1 (tables: artists, paintings)
Question: What is the name and year of each painting created by the artist whose first name is Mary?
SQL: SELECT T2.title ,   T2.year FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.fname  =  "Mary"
Database: art_1 (tables: artists, paintings)
Question: What are the widths of the paintings that were created by the artist who was born before 1850?
SQL: SELECT T2.width_mm FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.birthYear  <  1850
Database: art_1 (tables: artists, paintings)
Question: How wide were the paintings by the artist who was born prior to 1850?
SQL: SELECT T2.width_mm FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.birthYear  <  1850