Question: SELECT name ,  nationality FROM staff WHERE staff_id NOT IN (SELECT T2.staff_id FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id  =  T2.conference_id WHERE T1.Conference_Name  =  "ACL")

SELECT name , nationality FROM staff WHERE staff_id NOT IN ( SELECT T2.staff_id FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id WHERE T1.Conference_Name = `` ACL '' )

select name , nationality from staff where staff_id not in ( select t2 . staff_id from conference as t1 join conference_participation as t2 on t1 . conference_id = t2 . conference_id where t1 . conference_name = value )

Question: What are the names and nationalities of the people who did not participate in any ACL conferences?

What are the names and nationalities of the people who did not participate in any ACL conferences ?


Question: SELECT count(*) FROM Addresses

Question: Count the number of addresses.


Question: SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.food  =  "Cake" INTERSECT SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.food  =  "Cookie"

SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item = T2.id WHERE T2.food = `` Cake '' INTERSECT SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item = T2.id WHERE T2.food = `` Cookie ''

select t1 . receipt from items as t1 join goods as t2 on t1 . item = t2 . id where t2 . food = value intersect select t1 . receipt from items as t1 join goods as t2 on t1 . item = t2 . id where t2 . food = value

Question: Find the receipt numbers where both Cake and Cookie were bought.

Find the receipt numbers where both Cake and Cookie were bought .


Question: SELECT product_price ,  product_size FROM Products WHERE product_price  >  ( SELECT avg(product_price) FROM Products )

SELECT product_price , product_size FROM Products WHERE product_price > ( SELECT avg ( product_price ) FROM Products )

select product_price , product_size from products where product_price > ( select avg ( product_price ) from products )

Question: What are the prices and sizes of all products whose price is above the mean?

What are the prices and sizes of all products whose price is above the mean ?


Question: SELECT id FROM goods WHERE id LIKE "%APP%"

SELECT id FROM goods WHERE id LIKE `` % APP % ''

select id from goods where id like value

Question: What are all the ids of goods with an id which contains "APP"?

What are all the ids of goods with an id which contains `` APP '' ?


Question: SELECT T1.product_id ,  T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.product_id HAVING count(*)  >  3

Question: For all the products sold for more than 3 times, list their id and description.

For all the products sold for more than 3 times , list their id and description .


Question: SELECT count(DISTINCT T2.paper_id) ,  T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id GROUP BY T1.affiliation_id

Question: Find the total number of papers for each affiliation.

Find the total number of papers for each affiliation .


Question: SELECT avg(distance) ,  min(distance) ,  max(distance) FROM Direct_distance

SELECT avg ( distance ) , min ( distance ) , max ( distance ) FROM Direct_distance

select avg ( distance ) , min ( distance ) , max ( distance ) from direct_distance

Question: Give the average, minimum, and maximum distances between two cities.

Give the average , minimum , and maximum distances between two cities .


Question: SELECT city1_code ,  city2_code FROM Direct_distance WHERE distance  >  (SELECT avg(distance) FROM Direct_distance)

SELECT city1_code , city2_code FROM Direct_distance WHERE distance > ( SELECT avg ( distance ) FROM Direct_distance )

select city1_code , city2_code from direct_distance where distance > ( select avg ( distance ) from direct_distance )

Question: Show me the city code of two cities with a distance greater than the average.

Show me the city code of two cities with a distance greater than the average .


Question: SELECT max(price) ,  min(price) ,  avg(price) ,  flavor FROM goods GROUP BY flavor ORDER BY flavor

SELECT max ( price ) , min ( price ) , avg ( price ) , flavor FROM goods GROUP BY flavor ORDER BY flavor

select max ( price ) , min ( price ) , avg ( price ) , flavor from goods group by flavor order by flavor

Question: What are the maximum, minimum, and average prices of goods of each flavor, ordered by flavor?

What are the maximum , minimum , and average prices of goods of each flavor , ordered by flavor ?


Question: SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id WHERE T1.address LIKE "%China%" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1

SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id WHERE T1.address LIKE `` % China % '' GROUP BY T1.affiliation_id ORDER BY count ( * ) DESC LIMIT 1

select t1 . name from affiliation as t1 join author_list as t2 on t1 . affiliation_id = t2 . affiliation_id where t1 . address like value group by t1 . affiliation_id order by count ( * ) desc limit value

Question: Find the name of the affiliation whose address contains 'China' and publishes the greatest number of papers.

Find the name of the affiliation whose address contains 'China ' and publishes the greatest number of papers .


Question: SELECT Title ,  Developers FROM game ORDER BY Units_sold_Millions DESC

select title , developers from game order by units_sold_millions desc

Question: What are the titles and developers of all games, sorted by units sold descending?

What are the titles and developers of all games , sorted by units sold descending ?


Question: SELECT DISTINCT T1.ReceiptNumber FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id WHERE T3.price  >  13

select distinct t1 . receiptnumber from receipts as t1 join items as t2 on t1 . receiptnumber = t2 . receipt join goods as t3 on t2 . item = t3 . id where t3 . price > value

Question: List distinct receipt numbers for which someone bought a good that costs more than 13 dollars.

List distinct receipt numbers for which someone bought a good that costs more than 13 dollars .


Question: SELECT t1.manager ,  t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id  =  t2.team_id GROUP BY t2.team_id ORDER BY count(*) DESC LIMIT 1

SELECT t1.manager , t1.sponsor FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id = t2.team_id GROUP BY t2.team_id ORDER BY count ( * ) DESC LIMIT 1

select t1 . manager , t1 . sponsor from team as t1 join team_driver as t2 on t1 . team_id = t2 . team_id group by t2 . team_id order by count ( * ) desc limit value

Question: Find the manager and sponsor of the team that has the most drivers.

Find the manager and sponsor of the team that has the most drivers .


Question: SELECT avg(justice_score) FROM countries

SELECT avg ( justice_score ) FROM countries

select avg ( justice_score ) from countries

Question: What is the average justice scores among countries?

What is the average justice scores among countries ?


Question: SELECT T1.id ,  T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.bike_id GROUP BY T1.id HAVING count(*)  >=  4

SELECT T1.id , T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.bike_id GROUP BY T1.id HAVING count ( * ) > = 4

select t1 . id , t1 . product_name from bike as t1 join cyclists_own_bikes as t2 on t1 . id = t2 . bike_id group by t1 . id having count ( * ) > = value

Question: What are the ids and names of racing bikes that are purchased by at least 4 cyclists?

What are the ids and names of racing bikes that are purchased by at least 4 cyclists ?


Question: SELECT TYPE ,  COUNT(*) FROM book GROUP BY TYPE

SELECT TYPE , COUNT ( * ) FROM book GROUP BY TYPE

select type , count ( * ) from book group by type

Question: For each book type return the type and the number of books of that type.

For each book type return the type and the number of books of that type .


Question: SELECT customer_first_name ,  customer_middle_initial ,  customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name ,  T1.customer_middle_initial ,  T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id

Question: WHat are the first and last names, and middle initials of all customers who did not make any orders?

WHat are the first and last names , and middle initials of all customers who did not make any orders ?


Question: SELECT Capital FROM region WHERE Area  >  10000

select capital from region where area > value

Question: What are the capitals of the regions with area bigger than 10000?

What are the capitals of the regions with area bigger than 10000 ?


Question: SELECT order_status_code ,  count(*) FROM Customer_orders GROUP BY order_status_code

SELECT order_status_code , count ( * ) FROM Customer_orders GROUP BY order_status_code

select order_status_code , count ( * ) from customer_orders group by order_status_code

Question: Show all order status and the number of orders in each status.

Show all order status and the number of orders in each status .


Question: SELECT count(*) FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM review)

SELECT count ( * ) FROM book WHERE Book_ID NOT IN ( SELECT Book_ID FROM review )

select count ( * ) from book where book_id not in ( select book_id from review )

Question: How many books do not have reviews?


Question: SELECT avg(Units_sold_Millions) FROM game WHERE developers != 'Nintendo'

SELECT avg ( Units_sold_Millions ) FROM game WHERE developers ! = 'Nintendo '

select avg ( units_sold_millions ) from game where developers ! = value

Question: Return the average number of units sold in millions for games not developed by Nintendo.

Return the average number of units sold in millions for games not developed by Nintendo .


Question: SELECT avg(Year_Profits_billion) ,  max(Year_Profits_billion) FROM press

SELECT avg ( Year_Profits_billion ) , max ( Year_Profits_billion ) FROM press

select avg ( year_profits_billion ) , max ( year_profits_billion ) from press

Question: Find the average and maximum yearly profit for each press.

Find the average and maximum yearly profit for each press .


Question: SELECT CONSTRUCTOR FROM driver WHERE Age  <  20 INTERSECT SELECT CONSTRUCTOR FROM driver WHERE Age  >  30

select constructor from driver where age < value intersect select constructor from driver where age > value

Question: Show the constructors that are used both by drivers with age lower than 20 and drivers with age over than 30.

Show the constructors that are used both by drivers with age lower than 20 and drivers with age over than 30 .


Question: SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1

SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum ( enrollment ) LIMIT 1

select home_conference from university group by home_conference order by sum ( enrollment ) limit value

Question: Which conference has the least number of total enrollment?

Which conference has the least number of total enrollment ?


Question: select distinct t1.venue ,  t1.year from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"

Question: What are the venues and years where Mckeown , Kathleen had papers ?


Question: SELECT count(*) FROM Authors

Question: How many authors do we have?


Question: SELECT count(*) FROM City WHERE country  =  "CANADA"

SELECT count ( * ) FROM City WHERE country = `` CANADA ''

select count ( * ) from city where country = value

Question: How many cities are in Canada?


Question: SELECT shipment_tracking_number ,  shipment_date FROM Shipments

select shipment_tracking_number , shipment_date from shipments

Question: What are the tracking numbers and dates for all shipments listed?

What are the tracking numbers and dates for all shipments listed ?


Question: SELECT Document_Subset_Details FROM Document_Subsets WHERE Document_Subset_Name = "Best for 2000";

SELECT Document_Subset_Details FROM Document_Subsets WHERE Document_Subset_Name = `` Best for 2000 '' ;

Question: What is the detail of document subset with name 'Best for 2000'?

What is the detail of document subset with name 'Best for 2000 ' ?


Question: SELECT pilot_name FROM PilotSkills WHERE age  <  35 AND plane_name  =  'Piper Cub'

SELECT pilot_name FROM PilotSkills WHERE age < 35 AND plane_name = 'Piper Cub '

select pilot_name from pilotskills where age < value and plane_name = value

Question: What are the names of pilots who are younger than 35 and have a plane named Piper Cub?

What are the names of pilots who are younger than 35 and have a plane named Piper Cub ?


Question: SELECT date FROM receipts GROUP BY date ORDER BY count(*) DESC LIMIT 3

SELECT date FROM receipts GROUP BY date ORDER BY count ( * ) DESC LIMIT 3

select date from receipts group by date order by count ( * ) desc limit value

Question: Find the top three dates with the most receipts.

Find the top three dates with the most receipts .


Question: SELECT T3.date FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.date HAVING sum(T1.price)  >  100

select t3 . date from goods as t1 join items as t2 on t1 . id = t2 . item join receipts as t3 on t2 . receipt = t3 . receiptnumber group by t3 . date having sum ( t1 . price ) > value

Question: On which day did the bakery sell more than 100 dollars in total.

On which day did the bakery sell more than 100 dollars in total .


Question: SELECT DISTINCT T1.county_state_province FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id  =  T2.property_address_id;

SELECT DISTINCT T1.county_state_province FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id = T2.property_address_id ;

Question: In which states are each of the the properties located?

In which states are each of the the properties located ?


Question: SELECT product_id ,  product_type_code ,  product_name FROM Products

Question: Show all product ids, product type codes, and product name.

Show all product ids , product type codes , and product name .


Question: SELECT food ,  avg(price) ,  max(price) ,  min(price) FROM goods GROUP BY food

SELECT food , avg ( price ) , max ( price ) , min ( price ) FROM goods GROUP BY food

select food , avg ( price ) , max ( price ) , min ( price ) from goods group by food

Question: What are the average, minimum and maximum prices for each food?

What are the average , minimum and maximum prices for each food ?


Question: SELECT Make ,  COUNT(*) FROM driver GROUP BY Make

SELECT Make , COUNT ( * ) FROM driver GROUP BY Make

select make , count ( * ) from driver group by make

Question: List each make with the number of drivers with that make.

List each make with the number of drivers with that make .


Question: 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

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

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 ( * ) > value

Question: Find the names of districts which have more than one spokesman.

Find the names of districts which have more than one spokesman .


Question: SELECT TYPE FROM book GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1

SELECT TYPE FROM book GROUP BY TYPE ORDER BY COUNT ( * ) DESC LIMIT 1

select type from book group by type order by count ( * ) desc limit value

Question: What is the most common type of books?


Question: SELECT T2.Fname ,  T2.Major FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code WHERE T1.city_name  =  "Baltimore"

SELECT T2.Fname , T2.Major FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.city_name = `` Baltimore ''

select t2 . fname , t2 . major from city as t1 join student as t2 on t1 . city_code = t2 . city_code where t1 . city_name = value

Question: What are the first names and majors of students living in Baltimore?

What are the first names and majors of students living in Baltimore ?


Question: SELECT T1.name ,  count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC

SELECT T1.name , count ( * ) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id ORDER BY count ( * ) DESC

select t1 . name , count ( * ) from author as t1 join author_list as t2 on t1 . author_id = t2 . author_id group by t1 . author_id order by count ( * ) desc

Question: How many papers did each author publish, ordered by number of papers?

How many papers did each author publish , ordered by number of papers ?


Question: SELECT paper_id ,  count(*) FROM Citation GROUP BY cited_paper_id ORDER BY count(*) DESC LIMIT 1

SELECT paper_id , count ( * ) FROM Citation GROUP BY cited_paper_id ORDER BY count ( * ) DESC LIMIT 1

select paper_id , count ( * ) from citation group by cited_paper_id order by count ( * ) desc limit value

Question: What is the id and the number of citations of the most cited paper?

What is the id and the number of citations of the most cited paper ?


Question: SELECT sid ,  name FROM Sailors EXCEPT SELECT T1.sid ,  T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid

select sid , name from sailors except select t1 . sid , t1 . name from sailors as t1 join reserves as t2 on t1 . sid = t2 . sid

Question: what is the name and id of sailors who do not have a reservation of a boat?

what is the name and id of sailors who do not have a reservation of a boat ?


Question: SELECT count(*) FROM cyclist WHERE id NOT IN ( SELECT cyclist_id FROM cyclists_own_bikes WHERE purchase_year  >  2015 )

SELECT count ( * ) FROM cyclist WHERE id NOT IN ( SELECT cyclist_id FROM cyclists_own_bikes WHERE purchase_year > 2015 )

select count ( * ) from cyclist where id not in ( select cyclist_id from cyclists_own_bikes where purchase_year > value )

Question: How many cyclists did not purchase any bike after year 2015?

How many cyclists did not purchase any bike after year 2015 ?


Question: SELECT T3.Name ,  T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID  =  T2.Club_ID JOIN member AS T3 ON T1.Member_ID  =  T3.Member_ID

Question: Show the names of club leaders and the names of clubs they joined.

Show the names of club leaders and the names of clubs they joined .


Question: SELECT Name FROM region WHERE Region_ID NOT IN (SELECT Region_ID FROM building)

SELECT Name FROM region WHERE Region_ID NOT IN ( SELECT Region_ID FROM building )

select name from region where region_id not in ( select region_id from building )

Question: List the names of regions that do not have any buildings.

List the names of regions that do not have any buildings .


Question: SELECT client_id ,  count(*) FROM Invoices GROUP BY client_id

SELECT client_id , count ( * ) FROM Invoices GROUP BY client_id

select client_id , count ( * ) from invoices group by client_id

Question: How many invoices are there for each client id?

How many invoices are there for each client id ?


Question: SELECT avg(Population) FROM region

Question: Compute the average population of a region.

Compute the average population of a region .


Question: SELECT Collection_Description FROM Collections WHERE Collection_Name = "Best";

SELECT Collection_Description FROM Collections WHERE Collection_Name = `` Best '' ;

select collection_description from collections where collection_name = value

Question: What is the description of collection named Best?

What is the description of collection named Best ?


Question: SELECT T1.line_1_number_building ,  T1.line_2_number_street ,  T1.town_city FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id  =  T2.user_address_id WHERE T2.user_category_code  =  'Senior Citizen';

SELECT T1.line_1_number_building , T1.line_2_number_street , T1.town_city FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id = T2.user_address_id WHERE T2.user_category_code = 'Senior Citizen ' ;

Question: What are the buildings, streets, and cities corresponding to the addresses of senior citizens?

What are the buildings , streets , and cities corresponding to the addresses of senior citizens ?


Question: SELECT T1.Driver_Name ,  T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID

Question: What are the names of drivers and the names of the races they took part in?

What are the names of drivers and the names of the races they took part in ?


Question: SELECT TYPE FROM book GROUP BY TYPE HAVING COUNT(*)  >=  3

SELECT TYPE FROM book GROUP BY TYPE HAVING COUNT ( * ) > = 3

select type from book group by type having count ( * ) > = value

Question: What are the types of books that have at least three books belonging to?

What are the types of books that have at least three books belonging to ?


Question: SELECT state FROM University GROUP BY state ORDER BY count(*) DESC LIMIT 1

SELECT state FROM University GROUP BY state ORDER BY count ( * ) DESC LIMIT 1

select state from university group by state order by count ( * ) desc limit value

Question: Which state has most number of universities?

Which state has most number of universities ?


Question: SELECT distance FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code  =  T2.city_code JOIN City AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.city_name  =  "Boston" AND T3.city_name  =  "Newark"

SELECT distance FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code = T2.city_code JOIN City AS T3 ON T1.city2_code = T3.city_code WHERE T2.city_name = `` Boston '' AND T3.city_name = `` Newark ''

Question: What is the distance between Boston and Newark?

What is the distance between Boston and Newark ?


Question: SELECT T1.Title ,  T2.Platform_name FROM game AS T1 JOIN platform AS T2 ON T1.Platform_ID  =  T2.Platform_ID

Question: What are the titles and platform names of all games?

What are the titles and platform names of all games ?


Question: select name from author where author_id not in (select author_id from book)

select name from author where author_id not in ( select author_id from book )

Question: Which authors in the record have not published any books ? Give me their names .


Question: SELECT count(*) FROM Payments

Question: Count the number of payments.


Question: SELECT model ,  CLASS ,  construction FROM headphone ORDER BY price LIMIT 1

select model , class , construction from headphone order by price limit value

Question: Find the model, class, and construction of the headphone with the lowest price.

Find the model , class , and construction of the headphone with the lowest price .


Question: SELECT warehouse ,  avg(value) FROM boxes GROUP BY warehouse

SELECT warehouse , avg ( value ) FROM boxes GROUP BY warehouse

select warehouse , avg ( value ) from boxes group by warehouse

Question: Select the warehouse code and the average value of the boxes in each warehouse.

Select the warehouse code and the average value of the boxes in each warehouse .


Question: SELECT DISTINCT T1.Document_Subset_Name FROM Document_Subsets AS T1 JOIN Document_Subset_Members AS T2 ON T1.Document_Subset_ID =  T2.Document_Subset_ID JOIN Document_Objects AS T3 ON T2.Document_Object_ID  =  T3.Document_Object_ID WHERE T3.owner  =  'Braeden'

Question: Which unique subset does document owned by Braeden belong to? List the subset name.

Which unique subset does document owned by Braeden belong to ? List the subset name .


Question: SELECT sum(capacity) ,  avg(capacity) ,  max(capacity) ,  LOCATION FROM warehouses GROUP BY LOCATION

SELECT sum ( capacity ) , avg ( capacity ) , max ( capacity ) , LOCATION FROM warehouses GROUP BY LOCATION

select sum ( capacity ) , avg ( capacity ) , max ( capacity ) , location from warehouses group by location

Question: For each location, what are the total, average, and maximum capacities of warehouses?

For each location , what are the total , average , and maximum capacities of warehouses ?


Question: SELECT count(*) FROM channel WHERE internet LIKE "%bbc%"

SELECT count ( * ) FROM channel WHERE internet LIKE `` % bbc % ''

select count ( * ) from channel where internet like value

Question: How many channels have the word 'bbc' in their internet link?

How many channels have the word 'bbc ' in their internet link ?


Question: SELECT T1.id ,  T1.Name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id  =  T1.id GROUP BY T1.id HAVING count(*)  >=  2

SELECT T1.id , T1.Name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id GROUP BY T1.id HAVING count ( * ) > = 2

select t1 . id , t1 . name from participants as t1 join performance_score as t2 on t2 . participant_id = t1 . id group by t1 . id having count ( * ) > = value

Question: What are the ids and names of the participants who have performed at least two songs?

What are the ids and names of the participants who have performed at least two songs ?


Question: SELECT count(*) FROM pilotskills WHERE age  >  40

SELECT count ( * ) FROM pilotskills WHERE age > 40

select count ( * ) from pilotskills where age > value

Question: Count the number of pilots with age greater than 40.

Count the number of pilots with age greater than 40 .


Question: SELECT count(DISTINCT Province) FROM institution

SELECT count ( DISTINCT Province ) FROM institution

select count ( distinct province ) from institution

Question: Count the number of different provinces that have institutions.

Count the number of different provinces that have institutions .


Question: SELECT distinct(T1.detention_type_description) FROM Ref_Detention_Type AS T1 JOIN Detention AS T2 ON T1.detention_type_code  =  T2.detention_type_code

Question: What are the distinct descriptions of all the detentions which have ever happened?

What are the distinct descriptions of all the detentions which have ever happened ?


Question: SELECT Salary ,  POSITION FROM Employee WHERE Name  =  "Turanga Leela";

SELECT Salary , POSITION FROM Employee WHERE Name = `` Turanga Leela '' ;

select salary , position from employee where name = value

Question: What is the salary and position of the employee named Turanga Leela?

What is the salary and position of the employee named Turanga Leela ?


Question: SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";

SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber WHERE T2.Name = `` Leo Wong '' ;

select t1 . packagenumber from package as t1 join client as t2 on t1 . sender = t2 . accountnumber where t2 . name = value

Question: What is the number of all packages that Leo Wong sent?

What is the number of all packages that Leo Wong sent ?


Question: SELECT Collection_Name FROM Collections;

SELECT Collection_Name FROM Collections ;

Question: List the name of all collections.


Question: SELECT T1.first_name FROM Users AS T1 JOIN Properties AS T2 ON T2.owner_user_id  =  T1.User_id GROUP BY T1.User_id ORDER BY count(*) DESC LIMIT 1;

SELECT T1.first_name FROM Users AS T1 JOIN Properties AS T2 ON T2.owner_user_id = T1.User_id GROUP BY T1.User_id ORDER BY count ( * ) DESC LIMIT 1 ;

select t1 . first_name from users as t1 join properties as t2 on t2 . owner_user_id = t1 . user_id group by t1 . user_id order by count ( * ) desc limit value

Question: Return the first name of the user who owns the most properties.

Return the first name of the user who owns the most properties .


Question: SELECT count(*) ,  CLASS FROM headphone WHERE price  >  200 GROUP BY CLASS

SELECT count ( * ) , CLASS FROM headphone WHERE price > 200 GROUP BY CLASS

select count ( * ) , class from headphone where price > value group by class

Question: Find the number of headphones with a price higher than 200 for each class.

Find the number of headphones with a price higher than 200 for each class .


Question: SELECT T2.width_mm FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.birthYear  <  1850

select t2 . width_mm from artists as t1 join paintings as t2 on t1 . artistid = t2 . painterid where t1 . birthyear < value

Question: What are the widths of the paintings that were created by the artist who was born before 1850?

What are the widths of the paintings that were created by the artist who was born before 1850 ?


Question: SELECT name FROM press ORDER BY Year_Profits_billion DESC

select name from press order by year_profits_billion desc

Question: list all the names of press in descending order of the profit of the year.

list all the names of press in descending order of the profit of the year .


Question: SELECT title ,  isbn ,  SalePrice FROM Book

select title , isbn , saleprice from book

Question: What are the titles, ISBNs, and sale prices for all books?

What are the titles , ISBNs , and sale prices for all books ?


Question: SELECT name FROM director ORDER BY age DESC LIMIT 1

select name from director order by age desc limit value

Question: Find the the name of the oldest director.

Find the the name of the oldest director .


Question: SELECT pilot_name FROM pilotskills ORDER BY age DESC

select pilot_name from pilotskills order by age desc

Question: What are the names of pilots, ordered by age descending?

What are the names of pilots , ordered by age descending ?


Question: SELECT paintingID ,  height_mm FROM paintings WHERE LOCATION  =  'Gallery 240' ORDER BY width_mm DESC LIMIT 1

SELECT paintingID , height_mm FROM paintings WHERE LOCATION = 'Gallery 240 ' ORDER BY width_mm DESC LIMIT 1

select paintingid , height_mm from paintings where location = value order by width_mm desc limit value

Question: What are the id and height of the painting with the longest width in gallery 240?

What are the id and height of the painting with the longest width in gallery 240 ?


Question: SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' OR T2.location  =  'New York'

SELECT sum ( T1.value ) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago ' OR T2.location = 'New York '

select sum ( t1 . value ) from boxes as t1 join warehouses as t2 on t1 . warehouse = t2 . code where t2 . location = value or t2 . location = value

Question: What is the total value of boxes located in Chicago or New York?

What is the total value of boxes located in Chicago or New York ?


Question: SELECT T2.Name ,  count(*) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber GROUP BY T1.Sender ORDER BY count(*) DESC LIMIT 1;

SELECT T2.Name , count ( * ) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber GROUP BY T1.Sender ORDER BY count ( * ) DESC LIMIT 1 ;

select t2 . name , count ( * ) from package as t1 join client as t2 on t1 . sender = t2 . accountnumber group by t1 . sender order by count ( * ) desc limit value

Question: Who sent most number of packages? List client name and number of packages sent by that client.

Who sent most number of packages ? List client name and number of packages sent by that client .


Question: SELECT customer_name FROM Customers WHERE payment_method_code  =  ( SELECT payment_method_code FROM Customers GROUP BY payment_method_code ORDER BY count(*) ASC LIMIT 1)

SELECT customer_name FROM Customers WHERE payment_method_code = ( SELECT payment_method_code FROM Customers GROUP BY payment_method_code ORDER BY count ( * ) ASC LIMIT 1 )

select customer_name from customers where payment_method_code = ( select payment_method_code from customers group by payment_method_code order by count ( * ) asc limit value )

Question: What are the names of customers who use the least common payment method?

What are the names of customers who use the least common payment method ?


Question: SELECT district_id ,  name FROM district WHERE area_km  >  3000 OR population  >  4000

select district_id , name from district where area_km > value or population > value

Question: Return the ids and names of the districts whose population is larger than 4000 or area bigger than 3000.

Return the ids and names of the districts whose population is larger than 4000 or area bigger than 3000 .


Question: SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet;

SELECT T2.Name , count ( * ) FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet ;

select t2 . name , count ( * ) from shipment as t1 join planet as t2 on t1 . planet = t2 . planetid group by t1 . planet

Question: How many shipments take place on each planet?

How many shipments take place on each planet ?


Question: SELECT name ,  parking FROM store WHERE neighborhood  =  'Tarzana'

SELECT name , parking FROM store WHERE neighborhood = 'Tarzana '

select name , parking from store where neighborhood = value

Question: List name and parking info for the stores in the Tarzana neighborhood.

List name and parking info for the stores in the Tarzana neighborhood .


Question: SELECT CONTENTS FROM boxes WHERE Value  >  150

select contents from boxes where value > value

Question: What are the contents of boxes with value greater than 150?

What are the contents of boxes with value greater than 150 ?


Question: SELECT Make FROM team WHERE Car_Owner  =  "Buddy Arrington"

SELECT Make FROM team WHERE Car_Owner = `` Buddy Arrington ''

select make from team where car_owner = value

Question: What are the makes of the teams with car owner "Buddy Arrington"?

What are the makes of the teams with car owner `` Buddy Arrington '' ?


Question: SELECT T1.address_type_code ,  T2.address_type_description FROM Students_Addresses AS T1 JOIN Ref_Address_Types AS T2 WHERE T1.address_type_code  =  T2.address_type_code GROUP BY T1.address_type_code ORDER BY count(*) DESC LIMIT 1

Question: What is the most common student address type? Give me the code and description of the address type.

What is the most common student address type ? Give me the code and description of the address type .


Question: SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID =  T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID  =  T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID  =  T4.Collection_ID WHERE T2.Document_Subset_Name = "Best for 2000" AND T4.Collection_Name = "Best";

Question: List id of documents that in document subset Best for 2000 and collection named Best.

List id of documents that in document subset Best for 2000 and collection named Best .


Question: SELECT T1.Number_of_Stories FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID WHERE T2.Name  =  "Abruzzo"

SELECT T1.Number_of_Stories FROM building AS T1 JOIN region AS T2 ON T1.Region_ID = T2.Region_ID WHERE T2.Name = `` Abruzzo ''

Question: Show the number of stories of buildings in the region with name "Abruzzo".

Show the number of stories of buildings in the region with name `` Abruzzo '' .


Question: SELECT product_name FROM Products WHERE product_price  >  (SELECT avg(product_price) FROM Products)

SELECT product_name FROM Products WHERE product_price > ( SELECT avg ( product_price ) FROM Products )

select product_name from products where product_price > ( select avg ( product_price ) from products )

Question: Show all product names with price higher than the average.

Show all product names with price higher than the average .


Question: SELECT title FROM movies WHERE rating  =  'null'

SELECT title FROM movies WHERE rating = 'null '

select title from movies where rating = value

Question: What are the names of movies that do not have any ratings?

What are the names of movies that do not have any ratings ?


Question: SELECT * FROM discount

Question: Return all information about discounts.

Return all information about discounts .


Question: SELECT count(*) FROM Customers

Question: How many customers do we have?


Question: SELECT Winning_driver FROM race WHERE Pole_Position != 'Junior Strous'

SELECT Winning_driver FROM race WHERE Pole_Position ! = 'Junior Strous '

select winning_driver from race where pole_position ! = value

Question: Which winning drivers of races had pole position that is not "Junior Strous"?

Which winning drivers of races had pole position that is not `` Junior Strous '' ?


Question: SELECT type_of_powertrain FROM vehicles WHERE model_year  =  2014 INTERSECT SELECT type_of_powertrain FROM vehicles WHERE model_year  =  2013

select type_of_powertrain from vehicles where model_year = value intersect select type_of_powertrain from vehicles where model_year = value

Question: What are the types of powertrains that have vehicles that were made in both 2013 and 2014?

What are the types of powertrains that have vehicles that were made in both 2013 and 2014 ?


Question: SELECT name FROM Client EXCEPT SELECT T1.name FROM Client AS T1 JOIN Orders AS T2 ON T1.idClient  =  T2.idClient

select name from client except select t1 . name from client as t1 join orders as t2 on t1 . idclient = t2 . idclient

Question: Show all client names for clients who have not made orders.

Show all client names for clients who have not made orders .


Question: SELECT Stadium FROM institution ORDER BY Enrollment DESC LIMIT 1

select stadium from institution order by enrollment desc limit value

Question: What is the stadium of the institution with the largest enrollment?

What is the stadium of the institution with the largest enrollment ?


Question: SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id WHERE T3.name  =  "English"

SELECT avg ( T1.overall_score ) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id = T2.country_id JOIN languages AS T3 ON T2.language_id = T3.id WHERE T3.name = `` English ''

select avg ( t1 . overall_score ) from countries as t1 join official_languages as t2 on t1 . id = t2 . country_id join languages as t3 on t2 . language_id = t3 . id where t3 . name = value

Question: Show the average overall scores of countries whose official language is "English".

Show the average overall scores of countries whose official language is `` English '' .


Question: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon'

SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon '

select t1 . title from movies as t1 join movietheaters as t2 on t1 . code = t2 . movie where t2 . name = value

Question: What are the movie titles for ones that are played in the Odeon theater?

What are the movie titles for ones that are played in the Odeon theater ?


Question: SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" OR T3.Name = "Turanga Leela";

SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = `` Mars '' OR T3.Name = `` Turanga Leela '' ;

select t1 . shipmentid from shipment as t1 join planet as t2 on t1 . planet = t2 . planetid join employee as t3 on t3 . employeeid = t1 . manager where t2 . name = value or t3 . name = value

Question: List all shipment ids on the planet Mars or under the management of Turanga Leela.

List all shipment ids on the planet Mars or under the management of Turanga Leela .


Question: SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks' INTERSECT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Scissors'

SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks ' INTERSECT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Scissors '

select t2 . location from boxes as t1 join warehouses as t2 on t1 . warehouse = t2 . code where t1 . contents = value intersect select t2 . location from boxes as t1 join warehouses as t2 on t1 . warehouse = t2 . code where t1 . contents = value

Question: What are the locations of warehouses in which boxes that contain Rocks and Scissors are kept?

What are the locations of warehouses in which boxes that contain Rocks and Scissors are kept ?


Question: 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

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

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

Question: What are the different hangar locations and how many pilots correspond to each. Also, what are their average ages?

What are the different hangar locations and how many pilots correspond to each . Also , what are their average ages ?


Question: SELECT name FROM Author WHERE author_id IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "ACL" AND T2.year  =  2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "NAACL" AND T2.year  =  2009)

SELECT name FROM Author WHERE author_id IN ( SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = `` ACL '' AND T2.year = 2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id WHERE T2.venue = `` NAACL '' AND T2.year = 2009 )

select name from author where author_id in ( select t1 . author_id from author_list as t1 join paper as t2 on t1 . paper_id = t2 . paper_id where t2 . venue = value and t2 . year = value intersect select t1 . author_id from author_list as t1 join paper as t2 on t1 . paper_id = t2 . paper_id where t2 . venue = value and t2 . year = value )

Question: What are the names of authors who published in both NAACL and ACL in 2009?

What are the names of authors who published in both NAACL and ACL in 2009 ?


Question: SELECT product_name FROM Products WHERE product_type_code  =  "Hardware" ORDER BY product_price ASC

SELECT product_name FROM Products WHERE product_type_code = `` Hardware '' ORDER BY product_price ASC

select product_name from products where product_type_code = value order by product_price asc

Question: What are the names of all Hardware products, sorted by price ascending?

What are the names of all Hardware products , sorted by price ascending ?


Question: select distinct t1.venue ,  t1.year from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"

Question: Which venues and years did Mckeown , Kathleen have papers ?


Question: SELECT T1.name ,  count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC

SELECT T1.name , count ( * ) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id ORDER BY count ( * ) DESC

select t1 . name , count ( * ) from author as t1 join author_list as t2 on t1 . author_id = t2 . author_id group by t1 . author_id order by count ( * ) desc

Question: List the names of all authors and their number of papers in descending order by number of papers.

List the names of all authors and their number of papers in descending order by number of papers .


Question: SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name LIKE "%Plato%"

SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name LIKE `` % Plato % ''

select t1 . title from book as t1 join author_book as t2 on t1 . isbn = t2 . isbn join author as t3 on t2 . author = t3 . idauthor where t3 . name like value

Question: What are the titles of all books written by an author with a name that contains Plato?

What are the titles of all books written by an author with a name that contains Plato ?


Question: 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

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

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

Question: Find the number of spokesmen for each district, and the show district names as well.

Find the number of spokesmen for each district , and the show district names as well .


Question: SELECT name FROM spokesman WHERE points  <  (SELECT avg(points) FROM spokesman)

SELECT name FROM spokesman WHERE points < ( SELECT avg ( points ) FROM spokesman )

select name from spokesman where points < ( select avg ( points ) from spokesman )

Question: Which spokesman has lower points than the average?

Which spokesman has lower points than the average ?


Question: SELECT count(DISTINCT Engine) FROM driver WHERE Age  >  30 OR Age  <  20

SELECT count ( DISTINCT Engine ) FROM driver WHERE Age > 30 OR Age < 20

select count ( distinct engine ) from driver where age > value or age < value

Question: Count the number of different engines used by drivers who had an age either over 30 or under 20.

Count the number of different engines used by drivers who had an age either over 30 or under 20 .


Question: SELECT T1.Address ,  T2.Capital FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID

select t1 . address , t2 . capital from building as t1 join region as t2 on t1 . region_id = t2 . region_id

Question: For each building, return the address of the building and the name of the region it belongs to.

For each building , return the address of the building and the name of the region it belongs to .


Question: SELECT * FROM Sailors WHERE age  >  30

Question: Return all details of sailors who are older than 30.

Return all details of sailors who are older than 30 .


Question: SELECT name ,  address FROM Client ORDER BY name

select name , address from client order by name

Question: List names and addresses of all clients in alphabetical order by their names.

List names and addresses of all clients in alphabetical order by their names .


Question: SELECT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE T2.bid  =  102

select t1 . name from sailors as t1 join reserves as t2 on t1 . sid = t2 . sid where t2 . bid = value

Question: Who reserved boat 102?


Question: SELECT T1.product_name ,  T4.shipment_date FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id  =  T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id  =  T4.shipment_id

Question: List the names of the products being shipped and the corresponding shipment date.

List the names of the products being shipped and the corresponding shipment date .


Question: SELECT T3.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T1.age BETWEEN 20 AND 30

select t3 . name from sailors as t1 join reserves as t2 on t1 . sid = t2 . sid join boats as t3 on t3 . bid = t2 . bid where t1 . age between value and value

Question: What are the names of the boats booked by people between age 20 and 30?

What are the names of the boats booked by people between age 20 and 30 ?


Question: SELECT count(*) FROM club

Question: How many clubs are there?


Question: SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE  T1.rating  >  2

select distinct t1 . name , t1 . sid from sailors as t1 join reserves as t2 on t1 . sid = t2 . sid where t1 . rating > value

Question: what is the name and id of every sailor who has a rating greater than 2 and reserved a boat.

what is the name and id of every sailor who has a rating greater than 2 and reserved a boat .


Question: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' OR plane_name  =  'F-14 Fighter'

SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub ' OR plane_name = 'F-14 Fighter '

select pilot_name from pilotskills where plane_name = value or plane_name = value

Question: What are the names of pilots who have either the Piper Cub or the F-14 Fighter?

What are the names of pilots who have either the Piper Cub or the F-14 Fighter ?


Question: SELECT T1.bio_data ,  T2.date_of_transcript FROM Students AS T1 JOIN Transcripts AS T2 ON T1.student_id  =  T2.student_id

Question: List the biographical data and the date of the transcript of all the students.

List the biographical data and the date of the transcript of all the students .


Question: SELECT isbn ,  count(*) FROM Books_Order GROUP BY isbn

SELECT isbn , count ( * ) FROM Books_Order GROUP BY isbn

select isbn , count ( * ) from books_order group by isbn

Question: Show all book isbns and the numbers of orders for each.

Show all book isbns and the numbers of orders for each .


Question: select count(*) from citation as t1 join author_list as t2 on t1.cited_paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"

select
count
(
*
)
from
citation
as
t1
join
author_list
as
t2
on
t1.cited_paper_id
=
t2.paper_id
join
author
as
t3
on
t2.author_id
=
t3.author_id
where
t3.name
=
"mckeown ,  kathleen"

select count ( * ) from citation as t1 join author_list as t2 on t1 . cited_paper_id = t2 . paper_id join author as t3 on t2 . author_id = t3 . author_id where t3 . name = value

Question: How many citations does Mckeown , Kathleen have ?


Question: SELECT T1.student_id ,  T1.student_details FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING count(*)  =  2

SELECT T1.student_id , T1.student_details FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count ( * ) = 2

select t1 . student_id , t1 . student_details from students as t1 join classes as t2 on t1 . student_id = t2 . student_id group by t1 . student_id having count ( * ) = value

Question: Which students take 2 courses? List student id and details.

Which students take 2 courses ? List student id and details .


Question: SELECT city1_code ,  city2_code FROM Direct_distance ORDER BY distance DESC LIMIT 1

select city1_code , city2_code from direct_distance order by distance desc limit value

Question: Show me the city code of two cities with maximum distance.

Show me the city code of two cities with maximum distance .


Question: 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

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

select pilot_name , age from pilotskills where plane_name = value and age > value union select pilot_name , age from pilotskills where plane_name = value and age < value

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?

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 ?


Question: SELECT name ,  address FROM Client

Question: What are the names and addressed of all clients?

What are the names and addressed of all clients ?


Question: SELECT paintingID FROM paintings WHERE YEAR  <  (SELECT max(YEAR) FROM paintings WHERE LOCATION  =  "Gallery 240")

SELECT paintingID FROM paintings WHERE YEAR < ( SELECT max ( YEAR ) FROM paintings WHERE LOCATION = `` Gallery 240 '' )

select paintingid from paintings where year < ( select max ( year ) from paintings where location = value )

Question: What are the distinct ids of every painting that is older than some painting in gallery 240?

What are the distinct ids of every painting that is older than some painting in gallery 240 ?


Question: SELECT max(Age) ,  min(Age) FROM driver

SELECT max ( Age ) , min ( Age ) FROM driver

select max ( age ) , min ( age ) from driver

Question: Return the maximum and minimum age across drivers.

Return the maximum and minimum age across drivers .


Question: SELECT code ,  CONTENTS FROM boxes ORDER BY value

select code , contents from boxes order by value

Question: What are the codes and corresponding contents of all the boxes, ordered by their values?

What are the codes and corresponding contents of all the boxes , ordered by their values ?


Question: SELECT name FROM director WHERE age BETWEEN 30 AND 60

select name from director where age between value and value

Question: Find the name of the directors whose age is between 30 and 60.

Find the name of the directors whose age is between 30 and 60 .


Question: SELECT city1_code ,  city2_code FROM Direct_distance WHERE distance  <  1000

select city1_code , city2_code from direct_distance where distance < value

Question: What are the city codes corresponding to cities with distances less than 1000?

What are the city codes corresponding to cities with distances less than 1000 ?


Question: SELECT Document_Object_ID , count(*) FROM Document_Subset_Members GROUP BY Document_Object_ID HAVING count(*) BETWEEN 2 AND 4;

SELECT Document_Object_ID , count ( * ) FROM Document_Subset_Members GROUP BY Document_Object_ID HAVING count ( * ) BETWEEN 2 AND 4 ;

select document_object_id , count ( * ) from document_subset_members group by document_object_id having count ( * ) between value and value

Question: What are the ids of the dcouments that have between 2 and 4 related documents and how many related items are there?

What are the ids of the dcouments that have between 2 and 4 related documents and how many related items are there ?


Question: SELECT T2.name FROM renting_history AS T1 JOIN customers AS T2 ON T1.customer_id  =  T2.id GROUP BY T2.id HAVING count(*)  >=  2

SELECT T2.name FROM renting_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.id GROUP BY T2.id HAVING count ( * ) > = 2

select t2 . name from renting_history as t1 join customers as t2 on t1 . customer_id = t2 . id group by t2 . id having count ( * ) > = value

Question: Show the name of customer with at least two renting history records.

Show the name of customer with at least two renting history records .


Question: SELECT T1.invoice_id ,  T2.invoice_status ,  T2.invoice_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id GROUP BY T1.invoice_id ORDER BY count(*) DESC LIMIT 1

SELECT T1.invoice_id , T2.invoice_status , T2.invoice_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id = T2.invoice_id GROUP BY T1.invoice_id ORDER BY count ( * ) DESC LIMIT 1

select t1 . invoice_id , t2 . invoice_status , t2 . invoice_details from payments as t1 join invoices as t2 on t1 . invoice_id = t2 . invoice_id group by t1 . invoice_id order by count ( * ) desc limit value

Question: What is the invoice id, status code, and details for the invoice with most number of payments.

What is the invoice id , status code , and details for the invoice with most number of payments .


Question: SELECT Completed_Year FROM building GROUP BY Completed_Year ORDER BY COUNT(*) DESC LIMIT 1

SELECT Completed_Year FROM building GROUP BY Completed_Year ORDER BY COUNT ( * ) DESC LIMIT 1

select completed_year from building group by completed_year order by count ( * ) desc limit value

Question: List the year in which the most buildings are completed.

List the year in which the most buildings are completed .


Question: SELECT max(weight) ,  min(weight) FROM bike

SELECT max ( weight ) , min ( weight ) FROM bike

select max ( weight ) , min ( weight ) from bike

Question: What are the maximum and minimum weight of all bikes?

What are the maximum and minimum weight of all bikes ?


Question: SELECT T1.ReceiptNumber ,  T1.Date FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id ORDER BY T3.price DESC LIMIT 1

select t1 . receiptnumber , t1 . date from receipts as t1 join items as t2 on t1 . receiptnumber = t2 . receipt join goods as t3 on t2 . item = t3 . id order by t3 . price desc limit value

Question: What is the receipt number and date corresponding to the receipt for which the most expensive item was purchased?

What is the receipt number and date corresponding to the receipt for which the most expensive item was purchased ?


Question: SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID =  T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID =  T3.Collection_ID WHERE T3.Collection_Name = "Best";

Question: What are the collection subsets that the collection named 'Best' in?

What are the collection subsets that the collection named 'Best ' in ?


Question: SELECT product_type_code FROM Products GROUP BY product_type_code ORDER BY count(*) DESC LIMIT 1

SELECT product_type_code FROM Products GROUP BY product_type_code ORDER BY count ( * ) DESC LIMIT 1

select product_type_code from products group by product_type_code order by count ( * ) desc limit value

Question: What is the most frequent product type code?

What is the most frequent product type code ?


Question: SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code  =  T2.city_code JOIN Student AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.Fname  =  "Linda" AND T2.Lname  =  "Smith" AND T3.Fname  =  "Tracy" AND T3.Lname  =  "Kim"

SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code = T2.city_code JOIN Student AS T3 ON T1.city2_code = T3.city_code WHERE T2.Fname = `` Linda '' AND T2.Lname = `` Smith '' AND T3.Fname = `` Tracy '' AND T3.Lname = `` Kim ''

select distance from direct_distance as t1 join student as t2 on t1 . city1_code = t2 . city_code join student as t3 on t1 . city2_code = t3 . city_code where t2 . fname = value and t2 . lname = value and t3 . fname = value and t3 . lname = value

Question: What is the distance between the cities where Linda Smith and Tracy Kim live?

What is the distance between the cities where Linda Smith and Tracy Kim live ?


Question: SELECT sum(order_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id  =  T2.product_id WHERE T2.product_name  =  "Monitor"

SELECT sum ( order_quantity ) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = `` Monitor ''

Question: What is the total number of Monitor products that have been ordered?

What is the total number of Monitor products that have been ordered ?


Question: SELECT count(*) FROM Client

Question: How many clients are there?


Question: SELECT * FROM warehouses

Question: Select all details of all warehouses.


Question: SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id  =  T2.university_id WHERE T1.rank  =  1

Question: Show all university names without a major with rank 1?

Show all university names without a major with rank 1 ?


Question: SELECT Assessment FROM Student_Assessments GROUP BY Assessment ORDER BY COUNT(*) ASC LIMIT 1

SELECT Assessment FROM Student_Assessments GROUP BY Assessment ORDER BY COUNT ( * ) ASC LIMIT 1

select assessment from student_assessments group by assessment order by count ( * ) asc limit value

Question: Please show the least common assessment for students.

Please show the least common assessment for students .


Question: SELECT institution_name FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM staff)

SELECT institution_name FROM institution WHERE institution_id NOT IN ( SELECT institution_id FROM staff )

select institution_name from institution where institution_id not in ( select institution_id from staff )

Question: Show institution name which there is no staff in our record.

Show institution name which there is no staff in our record .


Question: select count(*) from sailors where name like 'd%'

select count ( * ) from sailors where name like "d%"

select count ( * ) from sailors where name like value

Question: How many sailors whose name starts with letter D exist ?


Question: SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid GROUP BY T2.sid HAVING COUNT(*)  >  1

SELECT DISTINCT T1.name , T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid = T2.sid GROUP BY T2.sid HAVING COUNT ( * ) > 1

select distinct t1 . name , t1 . sid from sailors as t1 join reserves as t2 on t1 . sid = t2 . sid group by t2 . sid having count ( * ) > value

Question: Find the id and name of the sailors who reserved more than one boat.

Find the id and name of the sailors who reserved more than one boat .


Question: 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

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

select t1 . artistid from artists as t1 join paintings as t2 on t1 . artistid = t2 . painterid where t2 . year < value group by t1 . artistid order by count ( * ) desc limit value

Question: What is the id of the artist who has the highest number of painting works before 1900?

What is the id of the artist who has the highest number of painting works before 1900 ?


Question: SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock)

SELECT model FROM headphone WHERE headphone_id NOT IN ( SELECT headphone_id FROM stock )

select model from headphone where headphone_id not in ( select headphone_id from stock )

Question: Which headphone models do not have any stock in any store?

Which headphone models do not have any stock in any store ?


Question: select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id  =  t2.customer_id group by t1.customer_details order by count(*) desc limit 1

select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id = t2.customer_id group by t1.customer_details order by count ( * ) desc limit 1

select t1 . customer_details from customers as t1 join customers_and_services as t2 on t1 . customer_id = t2 . customer_id group by t1 . customer_details order by count ( * ) desc limit value

Question: Find the name of the customer who has used the most types of services .


Question: SELECT T1.user_category_code ,  T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id  =  T2.user_id GROUP BY T1.user_id HAVING count(*)  =  1;

SELECT T1.user_category_code , T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id GROUP BY T1.user_id HAVING count ( * ) = 1 ;

Question: What are the ids of users who have only made one search, and what are their category codes?

What are the ids of users who have only made one search , and what are their category codes ?


Question: SELECT tv_show_name ,  Original_Airdate FROM tv_show

Question: What are the names and original air dates of tv shows?

What are the names and original air dates of tv shows ?


Question: SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.reputation_point

Question: What are the names of all universities in ascending order of reputation points?

What are the names of all universities in ascending order of reputation points ?


Question: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon' OR T2.name  =  'Imperial'

SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie WHERE T2.name = 'Odeon ' OR T2.name = 'Imperial '

select t1 . title from movies as t1 join movietheaters as t2 on t1 . code = t2 . movie where t2 . name = value or t2 . name = value

Question: Find the name of the movies that are played in either cinema Odeon or Imperial.

Find the name of the movies that are played in either cinema Odeon or Imperial .


Question: SELECT T1.Driver_Name ,  COUNT(*) FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID GROUP BY T1.Driver_ID

SELECT T1.Driver_Name , COUNT ( * ) FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID GROUP BY T1.Driver_ID

select t1 . driver_name , count ( * ) from driver as t1 join race as t2 on t1 . driver_id = t2 . driver_id group by t1 . driver_id

Question: How many races did each driver participate in?

How many races did each driver participate in ?


Question: SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS t1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id

Question: Show all product names without an order.

Show all product names without an order .


Question: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name  =  'B-52 Bomber'

SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub ' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber '

select pilot_name from pilotskills where plane_name = value except select pilot_name from pilotskills where plane_name = value

Question: What are the names of pilots who have flown Piper Cub but not the B-52 Bomber?

What are the names of pilots who have flown Piper Cub but not the B-52 Bomber ?


Question: SELECT order_status_code FROM Customer_orders GROUP BY order_status_code ORDER BY count(*) DESC LIMIT 1

SELECT order_status_code FROM Customer_orders GROUP BY order_status_code ORDER BY count ( * ) DESC LIMIT 1

select order_status_code from customer_orders group by order_status_code order by count ( * ) desc limit value

Question: What is the order status code that is most common?

What is the order status code that is most common ?


Question: SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = "Best";

Question: List all name of collections that are related to collection named Best.

List all name of collections that are related to collection named Best .


Question: SELECT count(*) FROM Paper WHERE venue  =  "NAACL" AND YEAR  =  2000

SELECT count ( * ) FROM Paper WHERE venue = `` NAACL '' AND YEAR = 2000

select count ( * ) from paper where venue = value and year = value

Question: Count the number of papers in NAACL 2000.

Count the number of papers in NAACL 2000 .


Question: SELECT avg(value) ,  sum(value) FROM boxes

SELECT avg ( value ) , sum ( value ) FROM boxes

select avg ( value ) , sum ( value ) from boxes

Question: What are the average and total values across all boxes?

What are the average and total values across all boxes ?


Question: SELECT T1.order_item_status_code ,  T3.shipment_tracking_number FROM Order_items AS T1 JOIN Shipment_Items AS T2 ON T1.order_item_id  =  T2.order_item_id JOIN Shipments AS T3 ON T2.shipment_id  =  T3.shipment_id

Question: What is the status code of the items have been ordered and shipped, and also what are their shipment tracking numbers?

What is the status code of the items have been ordered and shipped , and also what are their shipment tracking numbers ?


Question: SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "George Orwell"

SELECT avg ( saleprice ) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = `` George Orwell ''

select avg ( saleprice ) from book as t1 join author_book as t2 on t1 . isbn = t2 . isbn join author as t3 on t2 . author = t3 . idauthor where t3 . name = value

Question: Give the average sale price of books authored by George Orwell.

Give the average sale price of books authored by George Orwell .


Question: select warehouse ,  count(*) from boxes group by warehouse

select warehouse , count ( * ) from boxes group by warehouse

Question: How many boxes are there with each warehouse ?


Question: SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.class_details LIKE '%data%' EXCEPT SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.class_details LIKE 'net%'

SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.class_details LIKE ' % data % ' EXCEPT SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.class_details LIKE 'net % '

Question: Which teachers teach a class that has the substring 'data' in its detail but do not teach a class that has prefix 'net' in its detail? Give me the teacher details.

Which teachers teach a class that has the substring 'data ' in its detail but do not teach a class that has prefix 'net ' in its detail ? Give me the teacher details .


Question: SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%'

SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE ' % Bomber % '

select distinct plane_name from pilotskills where plane_name like value

Question: What are the different plane names that contain the word Bomber?

What are the different plane names that contain the word Bomber ?


Question: SELECT item FROM items GROUP BY item ORDER BY count(*) LIMIT 1

SELECT item FROM items GROUP BY item ORDER BY count ( * ) LIMIT 1

select item from items group by item order by count ( * ) limit value

Question: What is the item that was bought the least number of times?

What is the item that was bought the least number of times ?


Question: SELECT T1.Name ,  T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID

select t1 . name , t2 . name from building as t1 join region as t2 on t1 . region_id = t2 . region_id

Question: For each building, return the name of the building and the name of the region it belongs to.

For each building , return the name of the building and the name of the region it belongs to .


Question: select transmitter from radio order by erp_kw asc

Question: List the transmitters of radios in ascending order of erp kw .


Question: SELECT avg(Laps) FROM driver WHERE age  <  20

SELECT avg ( Laps ) FROM driver WHERE age < 20

select avg ( laps ) from driver where age < value

Question: Compute the average laps of drivers under the age of 20.

Compute the average laps of drivers under the age of 20 .


Question: SELECT name FROM district WHERE Government_website LIKE "%gov%"

SELECT name FROM district WHERE Government_website LIKE `` % gov % ''

select name from district where government_website like value

Question: Find the names of districts whose government links use a 'gov' domain.

Find the names of districts whose government links use a 'gov ' domain .


Question: SELECT order_status_code ,  date_order_placed FROM Orders

select order_status_code , date_order_placed from orders

Question: What are the status codes and dates placed for all of the orders?

What are the status codes and dates placed for all of the orders ?


Question: SELECT search_seq ,  user_id FROM User_Searches GROUP BY user_id HAVING count(*) >= 2;

SELECT search_seq , user_id FROM User_Searches GROUP BY user_id HAVING count ( * ) > = 2 ;

select search_seq , user_id from user_searches group by user_id having count ( * ) > = value

Question: What are the ids of users who have searched at least twice, and what did they search?

What are the ids of users who have searched at least twice , and what did they search ?


Question: SELECT count(DISTINCT neighborhood) FROM store

SELECT count ( DISTINCT neighborhood ) FROM store

select count ( distinct neighborhood ) from store

Question: Count the number of distinct neighborhoods stores are located.

Count the number of distinct neighborhoods stores are located .


Question: SELECT T1.id ,  T1.name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.cyclist_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

SELECT T1.id , T1.name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id GROUP BY T1.id ORDER BY count ( * ) DESC LIMIT 1

select t1 . id , t1 . name from cyclist as t1 join cyclists_own_bikes as t2 on t1 . id = t2 . cyclist_id group by t1 . id order by count ( * ) desc limit value

Question: What are the id and name of the cyclist who owns the most bikes?

What are the id and name of the cyclist who owns the most bikes ?


Question: SELECT T2.location ,   T2.medium FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.fname  =  "Pablo"

SELECT T2.location , T2.medium FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.fname = `` Pablo ''

select t2 . location , t2 . medium from artists as t1 join paintings as t2 on t1 . artistid = t2 . painterid where t1 . fname = value

Question: In what locations and on what mediums are the paintings created by the artist with the first name Pablo?

In what locations and on what mediums are the paintings created by the artist with the first name Pablo ?


Question: SELECT sum(t1.sale_amount) ,  t2.name FROM book AS t1 JOIN press AS t2 ON t1.press_id  =  t2.press_id GROUP BY t1.press_id

SELECT sum ( t1.sale_amount ) , t2.name FROM book AS t1 JOIN press AS t2 ON t1.press_id = t2.press_id GROUP BY t1.press_id

Question: Find the name and total book sale amount of each press.

Find the name and total book sale amount of each press .


Question: SELECT DISTINCT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE  T2.bid  =  103

select distinct t1 . name from sailors as t1 join reserves as t2 on t1 . sid = t2 . sid where t2 . bid = value

Question: What is the name of the sailors who reserved boat with id 103?

What is the name of the sailors who reserved boat with id 103 ?


Question: SELECT type_of_powertrain FROM vehicles WHERE model_year  =  2014 INTERSECT SELECT type_of_powertrain FROM vehicles WHERE model_year  =  2013

select type_of_powertrain from vehicles where model_year = value intersect select type_of_powertrain from vehicles where model_year = value

Question: Show types of powertrain with vehicles both from 2014 and 2013.

Show types of powertrain with vehicles both from 2014 and 2013 .


Question: SELECT avg(value) FROM boxes

Question: Select the average value of all the boxes.

Select the average value of all the boxes .


Question: SELECT model FROM vehicle WHERE power  >  6000 ORDER BY top_speed DESC LIMIT 1

select model from vehicle where power > value order by top_speed desc limit value

Question: Of vehicles with power over 6000, return the model of the vehicle with the greatest top speed.

Of vehicles with power over 6000 , return the model of the vehicle with the greatest top speed .


Question: SELECT T2.Name ,  count(*) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber GROUP BY T1.Sender HAVING count(*)  >  1;

SELECT T2.Name , count ( * ) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender = T2.AccountNumber GROUP BY T1.Sender HAVING count ( * ) > 1 ;

select t2 . name , count ( * ) from package as t1 join client as t2 on t1 . sender = t2 . accountnumber group by t1 . sender having count ( * ) > value

Question: Who sent more than one packages? List the client's name.

Who sent more than one packages ? List the client 's name .


Question: SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient  =  T2.idClient GROUP BY T1.idClient ORDER BY count(*) DESC LIMIT 1

SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient GROUP BY T1.idClient ORDER BY count ( * ) DESC LIMIT 1

select t2 . name from orders as t1 join client as t2 on t1 . idclient = t2 . idclient group by t1 . idclient order by count ( * ) desc limit value

Question: What is the name of the client with the most number of orders?

What is the name of the client with the most number of orders ?


Question: SELECT name FROM Sailors WHERE rating  >  (SELECT max(T1.rating) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.color  =  'red')

SELECT name FROM Sailors WHERE rating > ( SELECT max ( T1.rating ) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid = T2.sid JOIN Boats AS T3 ON T3.bid = T2.bid WHERE T3.color = 'red ' )

select name from sailors where rating > ( select max ( t1 . rating ) from sailors as t1 join reserves as t2 on t1 . sid = t2 . sid join boats as t3 on t3 . bid = t2 . bid where t3 . color = value )

Question: What are the names of the sailors whose rating is larger than the rating of all sailors who booked a red boat?

What are the names of the sailors whose rating is larger than the rating of all sailors who booked a red boat ?


Question: SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id  =  T2.university_id AND T1.major_id  =  T3.major_id WHERE T1.rank  <=  3 AND T3.major_name  =  "Accounting"

Question: What is the name of university with major Accounting ranked 3 or above?

What is the name of university with major Accounting ranked 3 or above ?


Question: SELECT avg(Units_sold_Millions) FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID  =  T2.Game_ID JOIN player AS T3 ON T2.Player_ID  =  T3.Player_ID WHERE T3.Position  =  "Guard"

SELECT avg ( Units_sold_Millions ) FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID = T2.Game_ID JOIN player AS T3 ON T2.Player_ID = T3.Player_ID WHERE T3.Position = `` Guard ''

Question: Return the average number of units sold in millions among games played by players who have the position Guard.

Return the average number of units sold in millions among games played by players who have the position Guard .


Question: select distinct t1.service_details from services as t1 join customers_and_services as t2 on t1.service_id  =  t2.service_id where t2.customers_and_services_details  =  "unsatisfied"

Question: Find details of all the services that have been marked as `` unsatisfied '' in customers and services details .


Question: SELECT DISTINCT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.year  <  1900

select distinct t1 . lname , t1 . fname from artists as t1 join sculptures as t2 on t1 . artistid = t2 . sculptorid where t2 . year < value

Question: What is the first and last name of each distinct artists who made a sculpture before 1900?

What is the first and last name of each distinct artists who made a sculpture before 1900 ?


Question: SELECT date_from ,  date_to FROM Students_Addresses WHERE student_id IN ( SELECT student_id FROM Transcripts GROUP BY student_id HAVING count(*)  =  2 )

SELECT date_from , date_to FROM Students_Addresses WHERE student_id IN ( SELECT student_id FROM Transcripts GROUP BY student_id HAVING count ( * ) = 2 )

select date_from , date_to from students_addresses where student_id in ( select student_id from transcripts group by student_id having count ( * ) = value )

Question: What are the start time and end time of addresses for the students who receive 2 transcripts?

What are the start time and end time of addresses for the students who receive 2 transcripts ?


Question: SELECT DISTINCT Manager FROM branch

Question: Show distinct managers of branches.


Question: SELECT author_name FROM Authors

Question: Show all author names.


Question: SELECT DISTINCT T4.FirstName ,  T4.LastName FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber JOIN customers AS T4 ON T3.CustomerId  =  T4.id WHERE T1.flavor  =  "Apple" AND T1.food  =  "Tart"

SELECT DISTINCT T4.FirstName , T4.LastName FROM goods AS T1 JOIN items AS T2 ON T1.id = T2.item JOIN receipts AS T3 ON T2.receipt = T3.ReceiptNumber JOIN customers AS T4 ON T3.CustomerId = T4.id WHERE T1.flavor = `` Apple '' AND T1.food = `` Tart ''

select distinct t4 . firstname , t4 . lastname from goods as t1 join items as t2 on t1 . id = t2 . item join receipts as t3 on t2 . receipt = t3 . receiptnumber join customers as t4 on t3 . customerid = t4 . id where t1 . flavor = value and t1 . food = value

Question: What are the full names of customers who bought apple flavored Tarts?

What are the full names of customers who bought apple flavored Tarts ?


Question: SELECT T2.Transmitter ,  COUNT(*) FROM city_channel_radio AS T1 JOIN radio AS T2 ON T1.Radio_ID  =  T2.Radio_ID GROUP BY T2.Transmitter

SELECT T2.Transmitter , COUNT ( * ) FROM city_channel_radio AS T1 JOIN radio AS T2 ON T1.Radio_ID = T2.Radio_ID GROUP BY T2.Transmitter

select t2 . transmitter , count ( * ) from city_channel_radio as t1 join radio as t2 on t1 . radio_id = t2 . radio_id group by t2 . transmitter

Question: Show the transmitters of the radios and the number of city channels they are associated with.

Show the transmitters of the radios and the number of city channels they are associated with .


Question: SELECT DISTINCT T3.product_name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.cyclist_id JOIN bike AS T3 ON T2.bike_id  =  T3.id WHERE T1.result  <  '4:21.558'

select distinct t3 . product_name from cyclist as t1 join cyclists_own_bikes as t2 on t1 . id = t2 . cyclist_id join bike as t3 on t2 . bike_id = t3 . id where t1 . result < value

Question: What are the names of distinct racing bikes that are purchased by the cyclists with better results than '4:21.558' ?

What are the names of distinct racing bikes that are purchased by the cyclists with better results than '4:21.558 ' ?


Question: SELECT city1_code ,  city2_code FROM Direct_distance ORDER BY distance DESC LIMIT 1

select city1_code , city2_code from direct_distance order by distance desc limit value

Question: What are the city codes of the cities with the maximum distance?

What are the city codes of the cities with the maximum distance ?


Question: SELECT Name FROM Employee WHERE Salary  >  5000 OR Salary  >  (SELECT avg(salary) FROM employee)

SELECT Name FROM Employee WHERE Salary > 5000 OR Salary > ( SELECT avg ( salary ) FROM employee )

select name from employee where salary > value or salary > ( select avg ( salary ) from employee )

Question: Find the name of employees whose salary is above the average salary or more than 5000.

Find the name of employees whose salary is above the average salary or more than 5000 .


Question: SELECT Name FROM building ORDER BY Number_of_Stories ASC

select name from building order by number_of_stories asc

Question: What is the list of building names, sorted by the number of stories of each building in ascending order?

What is the list of building names , sorted by the number of stories of each building in ascending order ?


Question: SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN meetings AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id HAVING count(*)  =  1 INTERSECT SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN invoices AS T2 ON T1.client_id  =  T2.client_id

Question: What are the id, sic code and agency id of the client who has attended 1 meeting and has any invoice.

What are the id , sic code and agency id of the client who has attended 1 meeting and has any invoice .


Question: 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

select t2 . title from artists as t1 join paintings as t2 on t1 . artistid = t2 . painterid where t1 . artistid = value union select t4 . title from artists as t3 join sculptures as t4 on t3 . artistid = t4 . sculptorid where t3 . artistid = value

Question: Find the titles of paintings and sculpture works made by the artist whose id is 222?

Find the titles of paintings and sculpture works made by the artist whose id is 222 ?


Question: SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID

Question: Show the names of customers and names of dishes they order.

Show the names of customers and names of dishes they order .


Question: SELECT T1.bio_data ,  T1.student_details FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id  =  T2.student_id WHERE T2.amount_of_loan  >  ( SELECT avg(amount_of_loan) FROM Student_Loans )

Question: Which students have a student loan more than the average amount? List the students' biographical data and the details.

Which students have a student loan more than the average amount ? List the students ' biographical data and the details .


Question: SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name  =  'B-52 Bomber'

SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub ' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber '

select pilot_name from pilotskills where plane_name = value except select pilot_name from pilotskills where plane_name = value

Question: Find pilots who own plane Piper Cub but not B-52 Bomber.

Find pilots who own plane Piper Cub but not B-52 Bomber .


Question: SELECT count(*) ,  student_id FROM Classes GROUP BY student_id ORDER BY count(*) DESC LIMIT 1

SELECT count ( * ) , student_id FROM Classes GROUP BY student_id ORDER BY count ( * ) DESC LIMIT 1

select count ( * ) , student_id from classes group by student_id order by count ( * ) desc limit value

Question: Which student is taking the most courses? Give me the id of the student and the number of courses he or she is taking.

Which student is taking the most courses ? Give me the id of the student and the number of courses he or she is taking .


Question: SELECT T2.name ,  T2.model_year FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id  =  T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1

SELECT T2.name , T2.model_year FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id = T2.id GROUP BY T2.id ORDER BY count ( * ) DESC LIMIT 1

select t2 . name , t2 . model_year from renting_history as t1 join vehicles as t2 on t1 . vehicles_id = t2 . id group by t2 . id order by count ( * ) desc limit value

Question: What is the name and model year of the vehicle which has been rented the most times?

What is the name and model year of the vehicle which has been rented the most times ?


Question: SELECT conference_name ,  count(*) FROM conference GROUP BY conference_name

SELECT conference_name , count ( * ) FROM conference GROUP BY conference_name

select conference_name , count ( * ) from conference group by conference_name

Question: For each conference name, how many times has it occurred?

For each conference name , how many times has it occurred ?


Question: SELECT T3.Transmitter ,  T2.Station_name FROM city_channel_radio AS T1 JOIN city_channel AS T2 ON T1.City_channel_ID  =  T2.ID JOIN radio AS T3 ON T1.Radio_ID  =  T3.Radio_ID ORDER BY T3.ERP_kW DESC

Question: Show the transmitters of radios and the station names of the channels they are associated with in descending order of the ERP of the radios.

Show the transmitters of radios and the station names of the channels they are associated with in descending order of the ERP of the radios .


Question: SELECT count(*) ,  food FROM goods GROUP BY food

SELECT count ( * ) , food FROM goods GROUP BY food

select count ( * ) , food from goods group by food

Question: How many goods are available for each food type?

How many goods are available for each food type ?


Question: SELECT DISTINCT home_conference FROM University

select distinct home_conference from university

Question: Show all home conferences.


Question: SELECT count(plane_name) FROM pilotskills WHERE pilot_name  =  'Smith'

SELECT count ( plane_name ) FROM pilotskills WHERE pilot_name = 'Smith '

select count ( plane_name ) from pilotskills where pilot_name = value

Question: How many planes are owned by the pilot whose name is Smith?

How many planes are owned by the pilot whose name is Smith ?


Question: SELECT name ,  age FROM Sailors WHERE age  <  30

select name , age from sailors where age < value

Question: Return name and age for sailors who are younger than 30.

Return name and age for sailors who are younger than 30 .


Question: SELECT avg(height_mm) ,  avg(width_mm) FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 241"

SELECT avg ( height_mm ) , avg ( width_mm ) FROM paintings WHERE medium = `` oil '' AND LOCATION = `` Gallery 241 ''

select avg ( height_mm ) , avg ( width_mm ) from paintings where medium = value and location = value

Question: What is the average height and width of paintings that are oil medium in gallery 241?

What is the average height and width of paintings that are oil medium in gallery 241 ?


Question: SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id  =  T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2

SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id = T2.conference_id GROUP BY T2.conference_id ORDER BY count ( * ) DESC LIMIT 2

select t1 . conference_name from conference as t1 join conference_participation as t2 on t1 . conference_id = t2 . conference_id group by t2 . conference_id order by count ( * ) desc limit value

Question: What are the names of the conferences that have the top 2 most people attending?

What are the names of the conferences that have the top 2 most people attending ?


Question: SELECT Name FROM player ORDER BY Wins_count ASC

select name from player order by wins_count asc

Question: Return the names of players in order of count of wins, ascending.

Return the names of players in order of count of wins , ascending .


Question: SELECT T1.payment_id ,  T1.payment_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id WHERE T2.invoice_status  =  'Working'

SELECT T1.payment_id , T1.payment_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id = T2.invoice_id WHERE T2.invoice_status = 'Working '

Question: What are all payment ids and payment details for invoices with status Working?

What are all payment ids and payment details for invoices with status Working ?


Question: SELECT min(annual_fuel_cost) ,  max(annual_fuel_cost) ,  avg(annual_fuel_cost) FROM vehicles

SELECT min ( annual_fuel_cost ) , max ( annual_fuel_cost ) , avg ( annual_fuel_cost ) FROM vehicles

select min ( annual_fuel_cost ) , max ( annual_fuel_cost ) , avg ( annual_fuel_cost ) from vehicles

Question: Show minimum, maximum, and average annual fuel cost for all vehicles.

Show minimum , maximum , and average annual fuel cost for all vehicles .


Question: SELECT meeting_type ,  other_details FROM meetings

select meeting_type , other_details from meetings

Question: List all meeting type codes and details.

List all meeting type codes and details .


Question: SELECT T1.order_item_status_code ,  T3.shipment_tracking_number FROM Order_items AS T1 JOIN Shipment_Items AS T2 ON T1.order_item_id  =  T2.order_item_id JOIN Shipments AS T3 ON T2.shipment_id  =  T3.shipment_id

Question: What is the status code of the items being ordered and shipped and its corresponding shipment tracking number?

What is the status code of the items being ordered and shipped and its corresponding shipment tracking number ?


Question: SELECT Valid_Answer_Text FROM Valid_Answers GROUP BY Valid_Answer_Text ORDER BY COUNT(*) DESC LIMIT 1

SELECT Valid_Answer_Text FROM Valid_Answers GROUP BY Valid_Answer_Text ORDER BY COUNT ( * ) DESC LIMIT 1

select valid_answer_text from valid_answers group by valid_answer_text order by count ( * ) desc limit value

Question: Find the valid answer text that appeared most frequently.

Find the valid answer text that appeared most frequently .


Question: SELECT client_id ,  count(*) FROM Meetings GROUP BY client_id

SELECT client_id , count ( * ) FROM Meetings GROUP BY client_id

select client_id , count ( * ) from meetings group by client_id

Question: List the client ids and the number of meeting for each client.

List the client ids and the number of meeting for each client .


Question: SELECT T1.product_name ,  T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id  =  T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id  =  T4.shipment_id

Question: What are the names and colors of all products that have been shipped?

What are the names and colors of all products that have been shipped ?


Question: SELECT id ,  flavor ,  food FROM goods ORDER BY price

select id , flavor , food from goods order by price

Question: What are the ids, flavors, and food types of goods, ordered by price?

What are the ids , flavors , and food types of goods , ordered by price ?


Question: SELECT date ,  COUNT (DISTINCT CustomerId) FROM receipts GROUP BY date

SELECT date , COUNT ( DISTINCT CustomerId ) FROM receipts GROUP BY date

select date , count ( distinct customerid ) from receipts group by date

Question: How many cusomters visited on each date?

How many cusomters visited on each date ?


Question: SELECT t1.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID  =  t2.Spokesman_ID WHERE t2.start_year  <  2004

Question: Find the names of spokesmen who have served some district before 2004.

Find the names of spokesmen who have served some district before 2004 .


Question: SELECT meeting_type ,  count(*) FROM Meetings GROUP BY meeting_type

SELECT meeting_type , count ( * ) FROM Meetings GROUP BY meeting_type

select meeting_type , count ( * ) from meetings group by meeting_type

Question: How many meetings are there for each meeting type?

How many meetings are there for each meeting type ?


Question: SELECT paper_id FROM Paper WHERE title LIKE "%translation%"

SELECT paper_id FROM Paper WHERE title LIKE `` % translation % ''

select paper_id from paper where title like value

Question: Find the id of the papers whose title has the key word 'translation'.

Find the id of the papers whose title has the key word 'translation ' .


Question: SELECT sum(capacity) FROM warehouses

Question: Find the total capacity of all warehouse locations.

Find the total capacity of all warehouse locations .


Question: SELECT max(saleprice - purchaseprice) FROM Book

SELECT max ( saleprice - purchaseprice ) FROM Book

select max ( saleprice - purchaseprice ) from book

Question: Return the largest difference in sale price and purchase price.

Return the largest difference in sale price and purchase price .


Question: SELECT T3.Transmitter ,  T2.City FROM city_channel_radio AS T1 JOIN city_channel AS T2 ON T1.City_channel_ID  =  T2.ID JOIN radio AS T3 ON T1.Radio_ID  =  T3.Radio_ID

Question: Show the transmitters of radios and the cities of the channels they are associated with.

Show the transmitters of radios and the cities of the channels they are associated with .


Question: SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id  =  T2.student_id ORDER BY T2.amount_of_loan ASC LIMIT 1

Question: Find the biographical information of the student with the smallest student loan.

Find the biographical information of the student with the smallest student loan .


Question: SELECT T3.name FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient JOIN Book AS T4 ON T4.isbn  =  T2.isbn WHERE T4.title  =  "Pride and Prejudice"

select t3 . name from orders as t1 join books_order as t2 on t1 . idorder = t2 . idorder join client as t3 on t1 . idclient = t3 . idclient join book as t4 on t4 . isbn = t2 . isbn where t4 . title = value

Question: Show all client names who have orders for "Pride and Prejudice".

Show all client names who have orders for `` Pride and Prejudice '' .


Question: select count(*) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = "mars" );

select count ( * ) from employee where employeeid not in ( select t2.employeeid from has_clearance as t1 join employee as t2 on t1.employee = t2.employeeid join planet as t3 on t1.planet = t3.planetid where t3.name = "mars" ) ;

select count ( * ) from employee where employeeid not in ( select t2 . employeeid from has_clearance as t1 join employee as t2 on t1 . employee = t2 . employeeid join planet as t3 on t1 . planet = t3 . planetid where t3 . name = value )

Question: Find the number of employees who do not have clearance in Mars .


Question: SELECT COUNT(*) FROM Sailors

Question: How many sailors exist?


Question: SELECT avg(ERP_kW) FROM radio

Question: What is the average ERP across all radios?

What is the average ERP across all radios ?


Question: SELECT Name FROM club WHERE Club_ID NOT IN (SELECT Club_ID FROM player)

SELECT Name FROM club WHERE Club_ID NOT IN ( SELECT Club_ID FROM player )

select name from club where club_id not in ( select club_id from player )

Question: What are the names of clubs that do not have any players?

What are the names of clubs that do not have any players ?


Question: SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1

SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count ( * ) ASC LIMIT 1

select vehicle_id from vehicle_driver group by vehicle_id order by count ( * ) asc limit value

Question: Return the id of the vehicle that has been driven the fewest times.

Return the id of the vehicle that has been driven the fewest times .