Question: SELECT count(*) FROM Author


Question: SELECT institution_name ,  LOCATION FROM institution ORDER BY founded DESC LIMIT 1

select institution_name , location from institution order by founded desc limit value

What are the names and locations of the most recently-founded institution?

What are the names and locations of the most recently-founded institution ?


Question: SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1

SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT ( * ) DESC LIMIT 1

select affiliation from institution group by affiliation order by count ( * ) desc limit value

Return the most common type of affiliation across all institutions.

Return the most common type of affiliation across all institutions .


Question: SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  'red' OR T1.color  =  "blue"

SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON T1.bid = T2.bid WHERE T1.color = 'red ' OR T1.color = `` blue ''

select distinct t2 . sid from boats as t1 join reserves as t2 on t1 . bid = t2 . bid where t1 . color = value or t1 . color = value

Find the id of Sailors (sid) that reserved red or blue boat.

Find the id of Sailors ( sid ) that reserved red or blue boat .


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

What is the count of the sailors whose name starts with letter D ?


Question: SELECT T2.Name ,  T1.Name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID

select t2 . name , t1 . name from club as t1 join player as t2 on t1 . club_id = t2 . club_id

What are the names of players and the corresponding clubs that they are in?

What are the names of players and the corresponding clubs that they are in ?


Question: SELECT address_id ,  address_details FROM Addresses

select address_id , address_details from addresses

List all address ids and address details.

List all address ids and address details .


Question: select distinct t1.name from driver as t1 join vehicle_driver as t2 on t1.driver_id  =  t2.driver_id join vehicle as t3 on t2.vehicle_id  =  t3.vehicle_id where t3.power  >  5000

What are the distinct driver names who have driven vehicles with power more than 5000 ?


Question: SELECT T3.name 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 GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC

select t3 . name 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 group by t3 . id order by avg ( t1 . overall_score ) desc

What are the names of the official languages, sorted descending by the average overall scores across the countries that correspond to each?

What are the names of the official languages , sorted descending by the average overall scores across the countries that correspond to each ?


Question: SELECT T1.start_date_time ,  T1.end_date_time ,  T2.client_details ,  T4.staff_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id  =  T2.client_id JOIN staff_in_meetings AS T3 ON T1.meeting_id  =  T3.meeting_id JOIN staff AS T4 ON T3.staff_id  =  T4.staff_id

What are the start and end times of each meeting, as well as the corresponding client and staff details the attendees?

What are the start and end times of each meeting , as well as the corresponding client and staff details the attendees ?


Question: SELECT id FROM goods WHERE food  =  "Cake" AND price  >=  (SELECT avg(price) FROM goods WHERE food  =  "Tart")

SELECT id FROM goods WHERE food = `` Cake '' AND price > = ( SELECT avg ( price ) FROM goods WHERE food = `` Tart '' )

select id from goods where food = value and price > = ( select avg ( price ) from goods where food = value )

Give me the ids of Cakes whose price is at least as much as the average price of Tart?

Give me the ids of Cakes whose price is at least as much as the average price of Tart ?


Question: SELECT lname ,  fname FROM artists WHERE birthYear  >  1850

select lname , fname from artists where birthyear > value

Find the first and last names of all artists who were born after 1850.

Find the first and last names of all artists who were born after 1850 .


Question: SELECT payment_method_code ,  customer_number FROM Customers WHERE customer_name  =  "Jeromy"

SELECT payment_method_code , customer_number FROM Customers WHERE customer_name = `` Jeromy ''

select payment_method_code , customer_number from customers where customer_name = value

Give the payment method code and customer number corresponding to the customer named Jeromy.

Give the payment method code and customer number corresponding to the customer named Jeromy .


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

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

select count ( * ) from city where country = value


Question: SELECT T1.customer_id ,  T1.customer_first_name ,  T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >  2 INTERSECT SELECT T1.customer_id ,  T1.customer_first_name ,  T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN Order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING count(*)  >= 3

SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count ( * ) > 2 INTERSECT SELECT T1.customer_id , T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING count ( * ) > = 3

List the id, first name and last name of the customers who both have placed more than 2 orders and have bought at least 3 items.

List the id , first name and last name of the customers who both have placed more than 2 orders and have bought at least 3 items .


Question: SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id JOIN customer_interactions AS t4 ON t3.service_id  =  t4.service_id WHERE t1.customer_details  =  "Hardy Kutch" AND t4.services_and_channels_details  =  "bad"

Which services are both used by the customer "Hardy Kutch" and are rated as "bad" in a customer interaction? Give me the service details.

Which services are both used by the customer `` Hardy Kutch '' and are rated as `` bad '' in a customer interaction ? Give me the service details .


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

List all university names in ascending order of their reputation points.

List all university names in ascending order of their reputation points .


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

Tell me the height and id number of the widest painting in gallery 240.

Tell me the height and id number of the widest painting in gallery 240 .


Question: select title from book order by saleprice asc limit 1

select title from book order by saleprice asc limit value

List all book titles which have the lowest sale price .


Question: SELECT Name FROM player ORDER BY Wins_count ASC

select name from player order by wins_count asc

What are the names of players in ascending order of wins count?

What are the names of players in ascending order of wins count ?


Question: SELECT T2.Name FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber ORDER BY T1.Weight DESC LIMIT 1

select t2 . name from package as t1 join client as t2 on t1 . recipient = t2 . accountnumber order by t1 . weight desc limit value


Question: SELECT avg(top_speed) FROM vehicle

Return the average top speed across all vehicles.

Return the average top speed across all vehicles .


Question: SELECT T2.age_category_code FROM Ref_User_Categories AS T1 JOIN Users AS T2 ON T1.user_category_code  =  T2.user_category_code WHERE T1.User_category_description LIKE "%Mother";

SELECT T2.age_category_code FROM Ref_User_Categories AS T1 JOIN Users AS T2 ON T1.user_category_code = T2.user_category_code WHERE T1.User_category_description LIKE `` % Mother '' ;

For users whose description contain the string 'Mother', which age categories are they in?

For users whose description contain the string 'Mother ' , which age categories are they in ?


Question: SELECT earpads FROM headphone EXCEPT SELECT earpads FROM headphone WHERE construction  =  'Plastic'

SELECT earpads FROM headphone EXCEPT SELECT earpads FROM headphone WHERE construction = 'Plastic '

select earpads from headphone except select earpads from headphone where construction = value

Find all earpads that do not use plastic construction.

Find all earpads that do not use plastic construction .


Question: SELECT DISTINCT type_of_powertrain FROM vehicles

select distinct type_of_powertrain from vehicles

List all distinct types of powertrain of vehicles.

List all distinct types of powertrain of vehicles .


Question: SELECT max(Rank_of_the_year) ,  min(Rank_of_the_year) FROM player

SELECT max ( Rank_of_the_year ) , min ( Rank_of_the_year ) FROM player

select max ( rank_of_the_year ) , min ( rank_of_the_year ) from player

What are the maximum and minimum rank of the year of players.

What are the maximum and minimum rank of the year of players .


Question: SELECT Address FROM building ORDER BY Completed_Year DESC

select address from building order by completed_year desc

Sort the buildings in descending order of building completion year, and return the building addresses.

Sort the buildings in descending order of building completion year , and return the building addresses .


Question: SELECT T2.Owner FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID WHERE T1.Owner  =  'Marlin'

Who is the owner of the parent document of every documents where 'Marlin' is the owner?

Who is the owner of the parent document of every documents where 'Marlin ' is the owner ?


Question: SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id HAVING count(*)  >  50

SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_id HAVING count ( * ) > 50

select t1 . name from author as t1 join author_list as t2 on t1 . author_id = t2 . author_id group by t1 . author_id having count ( * ) > value

List names of all authors who have more than 50 papers.

List names of all authors who have more than 50 papers .


Question: SELECT count(DISTINCT staff_role_code) FROM Staff_in_processes WHERE staff_id  =  3

SELECT count ( DISTINCT staff_role_code ) FROM Staff_in_processes WHERE staff_id = 3

select count ( distinct staff_role_code ) from staff_in_processes where staff_id = value

How many different roles does the staff with id 3 have?

How many different roles does the staff with id 3 have ?


Question: SELECT Document_Subset_Name FROM Document_Subsets;


Question: SELECT title FROM book EXCEPT SELECT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn  =  T2.isbn

select title from book except select t1 . title from book as t1 join books_order as t2 on t1 . isbn = t2 . isbn

Show all book titles for books that have no orders.

Show all book titles for books that have no orders .


Question: SELECT name FROM author EXCEPT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id JOIN press AS t3 ON t2.press_id  =  t3.press_id WHERE t3.name  =  'Accor'

SELECT name FROM author EXCEPT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id = t2.author_id JOIN press AS t3 ON t2.press_id = t3.press_id WHERE t3.name = 'Accor '

select name from author except select t1 . name from author as t1 join book as t2 on t1 . author_id = t2 . author_id join press as t3 on t2 . press_id = t3 . press_id where t3 . name = value

Find the names of the authors who did not have any book with the "Accor" press.

Find the names of the authors who did not have any book with the `` Accor '' press .


Question: SELECT count(*) FROM Citation WHERE cited_paper_id  =  "A00-1002"

SELECT count ( * ) FROM Citation WHERE cited_paper_id = `` A00-1002 ''

select count ( * ) from citation where cited_paper_id = value

Count the number of papers which cited a paper with id A00-1002.

Count the number of papers which cited a paper with id A00-1002 .


Question: SELECT T1.Name ,  sum(T2.Quantity) FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID GROUP BY T1.Name

select t1 . name , sum ( t2 . quantity ) from customer as t1 join customer_order as t2 on t1 . customer_id = t2 . customer_id group by t1 . name

Show each customer name and the total quantities of dishes ordered by that customer.

Show each customer name and the total quantities of dishes ordered by that customer .


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

What is the average overall score across countries with English as their official language?

What is the average overall score across countries with English as their official language ?


Question: SELECT T3.Name FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID GROUP BY T2.Planet HAVING sum(T1.Weight)  >  30;

SELECT T3.Name FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID GROUP BY T2.Planet HAVING sum ( T1.Weight ) > 30 ;

select t3 . name from package as t1 join shipment as t2 on t1 . shipment = t2 . shipmentid join planet as t3 on t2 . planet = t3 . planetid group by t2 . planet having sum ( t1 . weight ) > value

What are the names of all planets tjat have a total shipment weight greater than 30?

What are the names of all planets tjat have a total shipment weight greater than 30 ?


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.nation  =  'Russia' OR T1.nation  =  'Great Britain'

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.nation = 'Russia ' OR T1.nation = 'Great Britain '

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 . nation = value or t1 . nation = value

What are the distinct product names of bikes owned by cyclists from 'Russia' or cyclists from 'Great Britain'?

What are the distinct product names of bikes owned by cyclists from 'Russia ' or cyclists from 'Great Britain ' ?


Question: SELECT count(*) ,  warehouse FROM boxes GROUP BY warehouse

SELECT count ( * ) , warehouse FROM boxes GROUP BY warehouse

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

Find the number of boxes saved in each warehouse.

Find the number of boxes saved in each warehouse .


Question: SELECT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Normal" INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Absent"

SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = `` Normal '' INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments = `` Absent ''

select student_answer_text from student_answers where comments = value intersect select student_answer_text from student_answers where comments = value

Which student answer texts were given both "Normal" and "Absent" as comments?

Which student answer texts were given both `` Normal '' and `` Absent '' as comments ?


Question: SELECT DISTINCT t1.customer_details FROM customers AS t1 JOIN customer_interactions AS t2 ON t1.customer_id  =  t2.customer_id JOIN integration_platform AS t3 WHERE t3.integration_platform_details  =  "Fail"

Which customers have integration platform details "Fail" in interactions? Give me the customer details.

Which customers have integration platform details `` Fail '' in interactions ? Give me the customer details .


Question: SELECT count(DISTINCT LOCATION) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks'

SELECT count ( DISTINCT LOCATION ) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks '

select count ( distinct location ) from boxes as t1 join warehouses as t2 on t1 . warehouse = t2 . code where t1 . contents = value

Find the number of different locations where Rocks are stored.

Find the number of different locations where Rocks are stored .


Question: SELECT Name FROM region ORDER BY Area DESC LIMIT 5

select name from region order by area desc limit value

List the names of the regions with the top 5 largest areas.

List the names of the regions with the top 5 largest areas .


Question: SELECT home_conference FROM University GROUP BY home_conference HAVING avg(enrollment)  >  2000

SELECT home_conference FROM University GROUP BY home_conference HAVING avg ( enrollment ) > 2000

select home_conference from university group by home_conference having avg ( enrollment ) > value

Show all home conferences with average enrollment of universities above 2000.

Show all home conferences with average enrollment of universities above 2000 .


Question: SELECT title FROM program ORDER BY start_year DESC LIMIT 1

select title from program order by start_year desc limit value

Return the title of the program that began most recently.

Return the title of the program that began most recently .


Question: SELECT T1.customer_first_name ,  T4.product_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN Order_items AS T3 ON T2.order_id  =  T3.order_id JOIN Products AS T4 ON T3.product_id  =  T4.product_id

List all the pairs of buyer first names and product names.

List all the pairs of buyer first names and product names .


Question: SELECT name FROM countries ORDER BY education_score DESC

select name from countries order by education_score desc

What are the names of the countries, ordered descending by education score?

What are the names of the countries , ordered descending by education score ?


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

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

What is id about sailors who do not have boat reservations?

What is id about sailors who do not have boat reservations ?


Question: SELECT Country FROM player WHERE Wins_count  >  2 ORDER BY Earnings DESC LIMIT 1

select country from player where wins_count > value order by earnings desc limit value

Of players who have more than 2 wins, what is the country of the player who makes the most?

Of players who have more than 2 wins , what is the country of the player who makes the most ?


Question: SELECT product_name FROM Products ORDER BY product_price DESC

select product_name from products order by product_price desc

What are the names of the products, sorted by descending price?

What are the names of the products , sorted by descending price ?


Question: SELECT count(DISTINCT CONTENTS) FROM boxes

SELECT count ( DISTINCT CONTENTS ) FROM boxes

select count ( distinct contents ) from boxes

Find the number of all distinct contents in all the boxes.

Find the number of all distinct contents in all the boxes .


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

Show all client ids and the number of invoices for each client.

Show all client ids and the number of invoices for each client .


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

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

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

List top 10 most cited papers and their numbers of citations.

List top 10 most cited papers and their numbers of citations .


Question: SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.code HAVING count(*)  >  T2.capacity

SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse = T2.code GROUP BY T2.code HAVING count ( * ) > T2.capacity

select t2 . code from boxes as t1 join warehouses as t2 on t1 . warehouse = t2 . code group by t2 . code having count ( * ) > t2 . capacity

What are the codes of warehouses that have more boxes than their capacity?

What are the codes of warehouses that have more boxes than their capacity ?


Question: SELECT Document_Object_ID FROM Document_Objects;

What is the object id of the document objects?

What is the object id of the document objects ?


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

Show addresses of buildings and the capitals of regions they are in.

Show addresses of buildings and the capitals of regions they are in .


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

List Package Number of all package sent by Leo Wong?

List Package Number of all package sent by Leo Wong ?


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 )

Find the distinct ids of all paintings that are older than some painting at location gallery 240.

Find the distinct ids of all paintings that are older than some painting at location gallery 240 .


Question: SELECT agency_id ,  count(*) FROM Staff GROUP BY agency_id

SELECT agency_id , count ( * ) FROM Staff GROUP BY agency_id

select agency_id , count ( * ) from staff group by agency_id

Show the agency ids and the number of staff in each agent?

Show the agency ids and the number of staff in each agent ?


Question: SELECT isbn ,  sum(amount) FROM Books_Order GROUP BY isbn

SELECT isbn , sum ( amount ) FROM Books_Order GROUP BY isbn

select isbn , sum ( amount ) from books_order group by isbn

What are the isbns for all books, and what is the total amount ordered for each?

What are the isbns for all books , and what is the total amount ordered for each ?


Question: SELECT Name FROM Employee WHERE Salary BETWEEN 5000 AND 10000

select name from employee where salary between value and value

What are the employees's names for those that have salaries between 5000 and 10000?

What are the employees 's names for those that have salaries between 5000 and 10000 ?


Question: select service_details from services except select t2.service_details from customers_and_services as t1 join services as t2 on t1.service_id  =  t2.service_id

Find details of the services that no customer has ever used . Return the service details .


Question: SELECT Driver FROM driver ORDER BY Age ASC

select driver from driver order by age asc

List all the driver names in ascending order of age.

List all the driver names in ascending order of age .


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

SELECT avg ( value ) , max ( value ) , CONTENTS FROM boxes GROUP BY CONTENTS

select avg ( value ) , max ( value ) , contents from boxes group by contents

What are the average and maximum values for each type of content in boxes?

What are the average and maximum values for each type of content in boxes ?


Question: SELECT Province FROM institution WHERE Founded  <  1920 INTERSECT SELECT Province FROM institution WHERE Founded  >  1950

select province from institution where founded < value intersect select province from institution where founded > value

What are the provinces that have not only institutions founded before 1920, but also institutions founded after 1950?

What are the provinces that have not only institutions founded before 1920 , but also institutions founded after 1950 ?


Question: SELECT Affiliation FROM city_channel GROUP BY Affiliation HAVING COUNT(*)  >  3

SELECT Affiliation FROM city_channel GROUP BY Affiliation HAVING COUNT ( * ) > 3

select affiliation from city_channel group by affiliation having count ( * ) > value

List the affiliations shared by more than three city channels.

List the affiliations shared by more than three city channels .


Question: SELECT title ,  release_date FROM book ORDER BY sale_amount DESC LIMIT 5

select title , release_date from book order by sale_amount desc limit value

What are the 5 best books in terms of sale amount? Give me their titles and release dates.

What are the 5 best books in terms of sale amount ? Give me their titles and release dates .


Question: SELECT T3.Player_name ,  T3.rank_of_the_year 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 T1.Title  =  "Super Mario World"

Please show the names and rank of players that have played the game titled "Super Mario World".

Please show the names and rank of players that have played the game titled `` Super Mario World '' .


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(*)  >=  2

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 ( * ) >= 2

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

What are the different names of sailors who reserved two or more boats ?


Question: SELECT T2.title ,  T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn  =  T2.isbn GROUP BY T1.isbn ORDER BY sum(amount) DESC LIMIT 1

SELECT T2.title , T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY sum ( amount ) DESC LIMIT 1

select t2 . title , t2 . purchaseprice from books_order as t1 join book as t2 on t1 . isbn = t2 . isbn group by t1 . isbn order by sum ( amount ) desc limit value

Show the book title and purchase price of the book that has had the greatest amount in orders.

Show the book title and purchase price of the book that has had the greatest amount in orders .


Question: SELECT item FROM items GROUP BY item ORDER BY COUNT (*) DESC LIMIT 3

SELECT item FROM items GROUP BY item ORDER BY COUNT ( * ) DESC LIMIT 3

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

Give the three most purchased items at this bakery.

Give the three most purchased items at this bakery .


Question: SELECT 	count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  'Chicago'

SELECT count ( DISTINCT T1.pilot_name ) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name = T2.plane_name WHERE T2.location = 'Chicago '

select count ( distinct t1 . pilot_name ) from pilotskills as t1 join hangar as t2 on t1 . plane_name = t2 . plane_name where t2 . location = value

How many pilots whose planes are in Chicago?

How many pilots whose planes are in Chicago ?


Question: SELECT Engine FROM driver GROUP BY Engine HAVING COUNT(*)  >=  2

SELECT Engine FROM driver GROUP BY Engine HAVING COUNT ( * ) > = 2

select engine from driver group by engine having count ( * ) > = value

What are the engine types that are used by two or more drivers?

What are the engine types that are used by two or more drivers ?


Question: SELECT t1.name ,  sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id GROUP BY t2.store_id ORDER BY sum(t2.quantity) DESC LIMIT 1

SELECT t1.name , sum ( t2.quantity ) FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id GROUP BY t2.store_id ORDER BY sum ( t2.quantity ) DESC LIMIT 1

select t1 . name , sum ( t2 . quantity ) from store as t1 join stock as t2 on t1 . store_id = t2 . store_id group by t2 . store_id order by sum ( t2 . quantity ) desc limit value

Find the name of the store which has the most headphones in stock. List the number of headphones as well.

Find the name of the store which has the most headphones in stock . List the number of headphones as well .


Question: SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN Conference AS T3 ON T1.staff_id  =  T2.staff_id AND T2.conference_id  =  T3.conference_id WHERE T3.Conference_name  =  'ACL' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 JOIN conference AS T3 ON T1.staff_id  =  T2.staff_id AND T2.conference_id  =  T3.conference_id WHERE T3.Conference_name  =  'Naccl'

Show all names who have been in both ACL and Naccl.

Show all names who have been in both ACL and Naccl .


Question: SELECT T1.date_of_transcript FROM Transcripts AS T1 JOIN Student_Loans AS T2 ON T1.student_id  =  T2.student_id ORDER BY T2.amount_of_loan DESC LIMIT 1

When was the transcript issued for the student with loan of maximum value?

When was the transcript issued for the student with loan of maximum value ?


Question: select t1.name ,  sum(t2.quantity) from customer as t1 join customer_order as t2 on t1.customer_id  =  t2.customer_id group by t1.name

select t1 . name , sum ( t2 . quantity ) from customer as t1 join customer_order as t2 on t1 . customer_id = t2 . customer_id group by t1 . name

What is the total quantities of dishes ordered by each customer ? List the customer name and the total quantity .


Question: SELECT T2.title ,  T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn  =  T2.isbn GROUP BY T1.isbn ORDER BY sum(amount) DESC LIMIT 1

SELECT T2.title , T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn = T2.isbn GROUP BY T1.isbn ORDER BY sum ( amount ) DESC LIMIT 1

select t2 . title , t2 . purchaseprice from books_order as t1 join book as t2 on t1 . isbn = t2 . isbn group by t1 . isbn order by sum ( amount ) desc limit value

What is the title and purchase price of the book that has the highest total order amount?

What is the title and purchase price of the book that has the highest total order amount ?


Question: SELECT T1.name ,  count(*) FROM Author AS T1 JOIN Author_Book AS T2 ON T1.idAuthor  =  T2.Author GROUP BY T1.idAuthor

SELECT T1.name , count ( * ) FROM Author AS T1 JOIN Author_Book AS T2 ON T1.idAuthor = T2.Author GROUP BY T1.idAuthor

select t1 . name , count ( * ) from author as t1 join author_book as t2 on t1 . idauthor = t2 . author group by t1 . idauthor

What are the names of all the authors, and how many books has each written?

What are the names of all the authors , and how many books has each written ?


Question: SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id WHERE t2.book_series  =  'MM' INTERSECT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id WHERE t2.book_series  =  'LT'

SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id = t2.author_id WHERE t2.book_series = 'MM ' INTERSECT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id = t2.author_id WHERE t2.book_series = 'LT '

Which authors publish books in both "MM" and "LT" series? Give me the author names.

Which authors publish books in both `` MM '' and `` LT '' series ? Give me the author names .


Question: SELECT T1.Title 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.College  =  "Oklahoma" INTERSECT SELECT T1.Title 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.College  =  "Auburn"

Show the title of games that are played by both players from college "Oklahoma" and players from college "Auburn".

Show the title of games that are played by both players from college `` Oklahoma '' and players from college `` Auburn '' .


Question: SELECT count(DISTINCT LOCATION) FROM warehouses

SELECT count ( DISTINCT LOCATION ) FROM warehouses

select count ( distinct location ) from warehouses

Find all distinct locations of warehouses.

Find all distinct locations of warehouses .


Question: SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID  =  T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*)  >=  2

SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT ( * ) > = 2

select t2 . first_name from student_answers as t1 join students as t2 on t1 . student_id = t2 . student_id group by t1 . student_id having count ( * ) > = value

Please show the first names of the students that have at least two answer records.

Please show the first names of the students that have at least two answer records .


Question: SELECT DISTINCT painterID FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 240"

SELECT DISTINCT painterID FROM paintings WHERE medium = `` oil '' AND LOCATION = `` Gallery 240 ''

select distinct painterid from paintings where medium = value and location = value

Find the unique id of the painters who had medium oil paintings exhibited at gallery 240?

Find the unique id of the painters who had medium oil paintings exhibited at gallery 240 ?


Question: SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best";

SELECT count ( * ) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = `` Best '' ;

select count ( * ) from collections as t1 join documents_in_collections as t2 on t1 . collection_id = t2 . collection_id where t1 . collection_name = value

How many documents does collection named 'Best' has?

How many documents does collection named 'Best ' has ?


Question: SELECT count(*) FROM movies WHERE rating  =  'G'

SELECT count ( * ) FROM movies WHERE rating = 'G '

select count ( * ) from movies where rating = value

Find the number of movies whose rating is ‘G’.

Find the number of movies whose rating is ‘G’ .


Question: SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID  =  T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*)  >=  2

SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID = T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT ( * ) > = 2

select t2 . first_name from student_answers as t1 join students as t2 on t1 . student_id = t2 . student_id group by t1 . student_id having count ( * ) > = value

Which students have 2 or more answer records? Give me their first names.

Which students have 2 or more answer records ? Give me their first names .


Question: SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id  =  T2.teacher_id JOIN Transcripts AS T3 ON T2.student_id  =  T3.student_id ORDER BY T3.date_of_transcript ASC LIMIT 1

Find the details of the teachers who have taught the student with the earliest transcript issuance.

Find the details of the teachers who have taught the student with the earliest transcript issuance .


Question: SELECT avg(T3.room_count) FROM Property_Features AS T1 JOIN Features AS T2 ON T1.feature_id  =  T2.feature_id JOIN Properties AS T3 ON T1.property_id  =  T3.property_id WHERE T2.feature_name  =  'garden';

SELECT avg ( T3.room_count ) FROM Property_Features AS T1 JOIN Features AS T2 ON T1.feature_id = T2.feature_id JOIN Properties AS T3 ON T1.property_id = T3.property_id WHERE T2.feature_name = 'garden ' ;

On average, how many rooms do properties with garden features have?

On average , how many rooms do properties with garden features have ?


Question: SELECT count(*) FROM customer


Question: SELECT DISTINCT painterID FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 240"

SELECT DISTINCT painterID FROM paintings WHERE medium = `` oil '' AND LOCATION = `` Gallery 240 ''

select distinct painterid from paintings where medium = value and location = value

What is the unique id of every painter who had a medium oil painting displayed at gallery 240?

What is the unique id of every painter who had a medium oil painting displayed at gallery 240 ?


Question: SELECT Province FROM institution WHERE Founded  <  1920 INTERSECT SELECT Province FROM institution WHERE Founded  >  1950

select province from institution where founded < value intersect select province from institution where founded > value

Show the provinces that have both institutions founded before 1920 and institutions founded after 1950.

Show the provinces that have both institutions founded before 1920 and institutions founded after 1950 .


Question: SELECT count(DISTINCT T1.code) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie

SELECT count ( DISTINCT T1.code ) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie

select count ( distinct t1 . code ) from movies as t1 join movietheaters as t2 on t1 . code = t2 . movie

How many distinct movies are on in theaters?

How many distinct movies are on in theaters ?


Question: SELECT Date FROM Shipment;

What are the dates of every shipment in the database?

What are the dates of every shipment in the database ?


Question: SELECT T3.name 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 T1.overall_score  >  95 INTERSECT SELECT T3.name 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 T1.overall_score  <  90

What are the names of languages that are the official language not only for countries that have an overall score of above 95, but also for countries that have an overall score below 90?

What are the names of languages that are the official language not only for countries that have an overall score of above 95 , but also for countries that have an overall score below 90 ?


Question: SELECT T2.title ,   T2.year FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.fname  =  "Mary"

SELECT T2.title , T2.year FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID WHERE T1.fname = `` Mary ''

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

What is the name and year of each painting created by the artist whose first name is Mary?

What is the name and year of each painting created by the artist whose first name is Mary ?


Question: SELECT meeting_outcome ,  purpose_of_meeting FROM meetings

select meeting_outcome , purpose_of_meeting from meetings

What are all meeting outcomes and purposes?

What are all meeting outcomes and purposes ?


Question: SELECT DISTINCT name FROM MovieTheaters WHERE Movie  =  'null'

SELECT DISTINCT name FROM MovieTheaters WHERE Movie = 'null '

select distinct name from movietheaters where movie = value

Select the name of all movie theaters that are not currently showing a movie.

Select the name of all movie theaters that are not currently showing a movie .


Question: SELECT author_name ,  count(*) FROM Documents GROUP BY author_name

SELECT author_name , count ( * ) FROM Documents GROUP BY author_name

select author_name , count ( * ) from documents group by author_name

Show all author names and number of documents corresponding to each.

Show all author names and number of documents corresponding to each .


Question: SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T1.Number_of_Championships DESC

List the names of institutions in descending order of the number of championships.

List the names of institutions in descending order of the number of championships .


Question: SELECT invoice_id ,  count(*) FROM Payments GROUP BY invoice_id

SELECT invoice_id , count ( * ) FROM Payments GROUP BY invoice_id

select invoice_id , count ( * ) from payments group by invoice_id

Show all invoice ids and the number of payments for each invoice.

Show all invoice ids and the number of payments for each invoice .


Question: SELECT T1.country FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code GROUP BY T1.country ORDER BY count(*) LIMIT 1

SELECT T1.country FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.country ORDER BY count ( * ) LIMIT 1

select t1 . country from city as t1 join student as t2 on t1 . city_code = t2 . city_code group by t1 . country order by count ( * ) limit value

Which country has least number of students?

Which country has least number of students ?


Question: SELECT name FROM Sailors WHERE rating  >  (SELECT max(rating) FROM Sailors WHERE name  =  'Luis')

SELECT name FROM Sailors WHERE rating > ( SELECT max ( rating ) FROM Sailors WHERE name = 'Luis ' )

select name from sailors where rating > ( select max ( rating ) from sailors where name = value )

What are the names of all sailors with a higher rating than every sailor named Luis?

What are the names of all sailors with a higher rating than every sailor named Luis ?


Question: SELECT Nationality FROM customer GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1

SELECT Nationality FROM customer GROUP BY Nationality ORDER BY COUNT ( * ) DESC LIMIT 1

select nationality from customer group by nationality order by count ( * ) desc limit value

Show the most common nationality of customers.

Show the most common nationality of customers .


Question: SELECT count(*) FROM player WHERE Rank_of_the_year  <=  3

SELECT count ( * ) FROM player WHERE Rank_of_the_year < = 3

select count ( * ) from player where rank_of_the_year < = value

How many players have rank of the year smaller than 3?

How many players have rank of the year smaller than 3 ?


Question: SELECT property_id ,  vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1;

SELECT property_id , vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1 ;

select property_id , vendor_requested_price from properties order by vendor_requested_price limit value

What is the id of the property that had the lowest requested price from the vendor, and what was that price?

What is the id of the property that had the lowest requested price from the vendor , and what was that price ?


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

How many courses do students take at most? Also find the id of the student who takes the most courses.

How many courses do students take at most ? Also find the id of the student who takes the most courses .


Question: SELECT country ,  town_city FROM Addresses;

SELECT country , town_city FROM Addresses ;

select country , town_city from addresses

Which countries and cities are included in addresses?

Which countries and cities are included in addresses ?


Question: SELECT count(*) FROM race


Question: SELECT t1.model FROM headphone AS t1 JOIN stock AS t2 ON t1.headphone_id  =  t2.headphone_id GROUP BY t1.model ORDER BY sum(t2.quantity) DESC LIMIT 1

SELECT t1.model FROM headphone AS t1 JOIN stock AS t2 ON t1.headphone_id = t2.headphone_id GROUP BY t1.model ORDER BY sum ( t2.quantity ) DESC LIMIT 1

select t1 . model from headphone as t1 join stock as t2 on t1 . headphone_id = t2 . headphone_id group by t1 . model order by sum ( t2 . quantity ) desc limit value

Find the headphone model whose total quantity in stock is the largest.

Find the headphone model whose total quantity in stock is the largest .


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

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

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

What are the names of pilots who own both Piper Cub and the B-52 Bomber?

What are the names of pilots who own both Piper Cub and the B-52 Bomber ?


Question: select distinct t1.venue ,  t1.year from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join affiliation as t3 on t2.affiliation_id  =  t3.affiliation_id where t3.name = "columbia university"

Which venues and years did Columbia University have papers ?


Question: SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code ORDER BY T2.capacity DESC LIMIT 1

SELECT sum ( T1.value ) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code ORDER BY T2.capacity DESC LIMIT 1

select sum ( t1 . value ) from boxes as t1 join warehouses as t2 on t1 . warehouse = t2 . code order by t2 . capacity desc limit value

Find the total value of boxes stored in the warehouse with the largest capacity.

Find the total value of boxes stored in the warehouse with the largest capacity .


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 WHERE T2.Overall_Ranking  <  100

Show the names of club leaders of clubs with overall ranking higher than 100.

Show the names of club leaders of clubs with overall ranking higher than 100 .


Question: SELECT count(*) FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id  =  T2.user_id WHERE T1.is_buyer  =  1;

SELECT count ( * ) FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id = T2.user_id WHERE T1.is_buyer = 1 ;

select count ( * ) from users as t1 join user_searches as t2 on t1 . user_id = t2 . user_id where t1 . is_buyer = value

Count the number of searches made by buyers.

Count the number of searches made by buyers .


Question: SELECT Name FROM customer WHERE Nationality  =  "England" OR Nationality  =  "Australia"

SELECT Name FROM customer WHERE Nationality = `` England '' OR Nationality = `` Australia ''

select name from customer where nationality = value or nationality = value

Show the names of customers with nationality "England" or "Australia".

Show the names of customers with nationality `` England '' or `` Australia '' .


Question: SELECT Country FROM player GROUP BY Country HAVING COUNT(*)  >  1

SELECT Country FROM player GROUP BY Country HAVING COUNT ( * ) > 1

select country from player group by country having count ( * ) > value

List the country that have more than one player.

List the country that have more than one player .


Question: SELECT city_name FROM City WHERE country  =  "USA" ORDER BY latitude

SELECT city_name FROM City WHERE country = `` USA '' ORDER BY latitude

select city_name from city where country = value order by latitude

What are all the city names for cities in the USA, ordered by latitude?

What are all the city names for cities in the USA , ordered by latitude ?


Question: SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1

SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie GROUP BY T1.title ORDER BY count ( * ) DESC LIMIT 1

select t1 . title from movies as t1 join movietheaters as t2 on t1 . code = t2 . movie group by t1 . title order by count ( * ) desc limit value

Find the name of the movie that is played in the most number of theaters.

Find the name of the movie that is played in the most number of theaters .


Question: SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1

select date_of_loan from student_loans order by date_of_loan asc limit value

Return the earliest date of loan in the record.

Return the earliest date of loan in the record .


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 )

What is the number of employees that do not have clearance on Mars ?


Question: SELECT DISTINCT T1.item FROM items AS T1 JOIN receipts AS T2 ON T1.receipt  =  T2.ReceiptNumber WHERE T2.CustomerId  =  15

select distinct t1 . item from items as t1 join receipts as t2 on t1 . receipt = t2 . receiptnumber where t2 . customerid = value

Give me a list of all the distinct items bought by the customer number 15.

Give me a list of all the distinct items bought by the customer number 15 .


Question: SELECT T3.name 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 GROUP BY T3.id ORDER BY avg(T1.overall_score) DESC

select t3 . name 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 group by t3 . id order by avg ( t1 . overall_score ) desc

Show the official languages sorted in descending order by the average overall scores among countries speaking them.

Show the official languages sorted in descending order by the average overall scores among countries speaking them .


Question: SELECT invoice_id ,  count(*) FROM Payments GROUP BY invoice_id

SELECT invoice_id , count ( * ) FROM Payments GROUP BY invoice_id

select invoice_id , count ( * ) from payments group by invoice_id

How many payments are there for each invoice?

How many payments are there for each invoice ?


Question: SELECT T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) DESC LIMIT 1

SELECT T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID GROUP BY T2.sculptorID ORDER BY count ( * ) DESC LIMIT 1

select t1 . fname from artists as t1 join sculptures as t2 on t1 . artistid = t2 . sculptorid group by t2 . sculptorid order by count ( * ) desc limit value

What is the first name of the sculptor with the greatest number of works?

What is the first name of the sculptor with the greatest number of works ?


Question: SELECT T1.state FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code GROUP BY T1.state ORDER BY count(*) DESC LIMIT 1

SELECT T1.state FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.state ORDER BY count ( * ) DESC LIMIT 1

select t1 . state from city as t1 join student as t2 on t1 . city_code = t2 . city_code group by t1 . state order by count ( * ) desc limit value

Which state has most number of students?

Which state has most number of students ?


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

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

What are the names of the different clients who have made an order?

What are the names of the different clients who have made an order ?


Question: SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "Carl Skerlong" INTERSECT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "James Hinchcliffe"

SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = `` Carl Skerlong '' INTERSECT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID WHERE Pole_Position = `` James Hinchcliffe ''

What are the names of drivers who had both the pole position James Hinchcliffe and the pole position Carl Skerlong?

What are the names of drivers who had both the pole position James Hinchcliffe and the pole position Carl Skerlong ?


Question: SELECT count(*) FROM Author


Question: SELECT DISTINCT T1.item FROM items AS T1 JOIN receipts AS T2 ON T1.receipt  =  T2.ReceiptNumber WHERE T2.CustomerId  =  15

select distinct t1 . item from items as t1 join receipts as t2 on t1 . receipt = t2 . receiptnumber where t2 . customerid = value

What are all the distinct items bought by customer 15?

What are all the distinct items bought by customer 15 ?


Question: SELECT name FROM countries ORDER BY overall_score DESC

select name from countries order by overall_score desc

What are the names of the countries, ordered descending by overall score?

What are the names of the countries , ordered descending by overall score ?


Question: SELECT type_of_powertrain FROM vehicles GROUP BY type_of_powertrain ORDER BY count(*) DESC LIMIT 1

SELECT type_of_powertrain FROM vehicles GROUP BY type_of_powertrain ORDER BY count ( * ) DESC LIMIT 1

select type_of_powertrain from vehicles group by type_of_powertrain order by count ( * ) desc limit value

Which type of powertrain is most common?

Which type of powertrain is most common ?


Question: SELECT product_size FROM Products WHERE product_name LIKE '%Dell%'

SELECT product_size FROM Products WHERE product_name LIKE ' % Dell % '

select product_size from products where product_name like value

What are the sizes of all products whose name includes the word 'Dell'?

What are the sizes of all products whose name includes the word 'Dell ' ?


Question: SELECT Title FROM Movies WHERE Code NOT IN (SELECT Movie FROM MovieTheaters WHERE Movie != 'null')

SELECT Title FROM Movies WHERE Code NOT IN ( SELECT Movie FROM MovieTheaters WHERE Movie ! = 'null ' )

select title from movies where code not in ( select movie from movietheaters where movie ! = value )

Show the titles of movies not currently being shown in any theaters.

Show the titles of movies not currently being shown in any theaters .


Question: SELECT DISTINCT T3.CustomerId FROM goods AS T1 JOIN items AS T2 ON T1.Id  =  T2.Item JOIN receipts AS T3 ON T2.Receipt  =  T3.ReceiptNumber WHERE T1.Flavor  =  "Lemon" AND T1.Food  =  "Cake"

SELECT DISTINCT T3.CustomerId FROM goods AS T1 JOIN items AS T2 ON T1.Id = T2.Item JOIN receipts AS T3 ON T2.Receipt = T3.ReceiptNumber WHERE T1.Flavor = `` Lemon '' AND T1.Food = `` Cake ''

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

What are the distinct ids of customers who bought lemon flavored cake?

What are the distinct ids of customers who bought lemon flavored cake ?


Question: SELECT T1.achievement_details ,  T2.achievement_type_description FROM Achievements AS T1 JOIN Ref_Achievement_Type AS T2 ON T1.achievement_type_code  =  T2.achievement_type_code

What are the achievement detail and the type description of each achievements?

What are the achievement detail and the type description of each achievements ?


Question: SELECT count(*) FROM University WHERE state  =  'Illinois' OR state  =  'Ohio'

SELECT count ( * ) FROM University WHERE state = 'Illinois ' OR state = 'Ohio '

select count ( * ) from university where state = value or state = value

How many universities are in Illinois or Ohio?

How many universities are in Illinois or Ohio ?


Question: SELECT avg(City_fuel_economy_rate) ,  avg(Highway_fuel_economy_rate) , Type_of_powertrain FROM vehicles GROUP BY Type_of_powertrain

SELECT avg ( City_fuel_economy_rate ) , avg ( Highway_fuel_economy_rate ) , Type_of_powertrain FROM vehicles GROUP BY Type_of_powertrain

select avg ( city_fuel_economy_rate ) , avg ( highway_fuel_economy_rate ) , type_of_powertrain from vehicles group by type_of_powertrain

Find the average city and highway fuel rates for cars with different powertrain types.

Find the average city and highway fuel rates for cars with different powertrain types .


Question: SELECT model FROM vehicle WHERE total_production  >  100 OR top_speed  >  150

select model from vehicle where total_production > value or top_speed > value

Give the models of cars that have a total production of over 100 or a top speed over 150.

Give the models of cars that have a total production of over 100 or a top speed over 150 .


Question: SELECT first_name ,  middle_name ,  last_name ,  login_name FROM Users WHERE is_seller  =  1;

List the first name, middle name and last name, and log in name of all the seller users, whose seller value is 1.

List the first name , middle name and last name , and log in name of all the seller users , whose seller value is 1 .


Question: SELECT Manager ,  Captain FROM club

Return the managers and captains of all clubs.

Return the managers and captains of all clubs .


Question: SELECT login_name FROM Users WHERE user_category_code  =  'Senior Citizen' ORDER BY first_name

SELECT login_name FROM Users WHERE user_category_code = 'Senior Citizen ' ORDER BY first_name

select login_name from users where user_category_code = value order by first_name

Find the login names of all senior citizen users ordered by their first names.

Find the login names of all senior citizen users ordered by their first names .


Question: SELECT distance FROM Direct_distance WHERE city1_code  =  "BAL" AND city2_code  =  "CHI"

SELECT distance FROM Direct_distance WHERE city1_code = `` BAL '' AND city2_code = `` CHI ''

select distance from direct_distance where city1_code = value and city2_code = value

What is the distance between BAL and CHI?

What is the distance between BAL and CHI ?


Question: SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  'red' INTERSECT SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid WHERE T1.color  =  "blue"

SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON T1.bid = T2.bid WHERE T1.color = 'red ' INTERSECT SELECT DISTINCT T2.sid FROM Boats AS T1 JOIN Reserves AS T2 ON T1.bid = T2.bid WHERE T1.color = `` blue ''

select distinct t2 . sid from boats as t1 join reserves as t2 on t1 . bid = t2 . bid where t1 . color = value intersect select distinct t2 . sid from boats as t1 join reserves as t2 on t1 . bid = t2 . bid where t1 . color = value

What are the ids of sailors who reserved red and blue boats?

What are the ids of sailors who reserved red and blue boats ?


Question: SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age

select pilot_name from pilotskills where age between value and value order by age

Find the names of all pilots with age between 30 and 40 sorted by their ages in ascending order.

Find the names of all pilots with age between 30 and 40 sorted by their ages in ascending order .


Question: SELECT t2.name ,  t2.age FROM program AS t1 JOIN director AS t2 ON t1.director_id  =  t2.director_id GROUP BY t1.director_id ORDER BY count(*) DESC LIMIT 1

SELECT t2.name , t2.age FROM program AS t1 JOIN director AS t2 ON t1.director_id = t2.director_id GROUP BY t1.director_id ORDER BY count ( * ) DESC LIMIT 1

select t2 . name , t2 . age from program as t1 join director as t2 on t1 . director_id = t2 . director_id group by t1 . director_id order by count ( * ) desc limit value

Find the name and age of the director who is in charge of the most programs?

Find the name and age of the director who is in charge of the most programs ?


Question: SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages)

SELECT name FROM languages WHERE id NOT IN ( SELECT language_id FROM official_languages )

select name from languages where id not in ( select language_id from official_languages )

List the names of languages that are not the official language of any countries.

List the names of languages that are not the official language of any countries .


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

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

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


Question: SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )

SELECT count ( * ) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )

select count ( * ) from products where product_id not in ( select product_id from order_items )

What is the number of products that have not been ordered yet?

What is the number of products that have not been ordered yet ?


Question: SELECT T1.order_id ,  T1.order_status_code ,  count(*) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id

SELECT T1.order_id , T1.order_status_code , count ( * ) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id

For the orders with any produts, how many products does each orders contain ? List the order id, status and the number.

For the orders with any produts , how many products does each orders contain ? List the order id , status and the number .


Question: SELECT Exam_Date FROM Exams WHERE Subject_Code LIKE '%data%' ORDER BY Exam_Date DESC

SELECT Exam_Date FROM Exams WHERE Subject_Code LIKE ' % data % ' ORDER BY Exam_Date DESC

select exam_date from exams where subject_code like value order by exam_date desc

What are the dates of the exams whose subject code contains the substring "data"? Return them in descending order of dates.

What are the dates of the exams whose subject code contains the substring `` data '' ? Return them in descending order of dates .


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

What are the names of clients who have never made an order?

What are the names of clients who have never made an order ?


Question: SELECT name FROM store WHERE store_id NOT IN (SELECT store_id FROM stock)

SELECT name FROM store WHERE store_id NOT IN ( SELECT store_id FROM stock )

select name from store where store_id not in ( select store_id from stock )

Which stores do not have any headphones in stock? Give me the store names.

Which stores do not have any headphones in stock ? Give me the store names .


Question: SELECT name FROM Sailors WHERE rating  >  (SELECT max(rating) FROM Sailors WHERE name  =  'Luis')

SELECT name FROM Sailors WHERE rating > ( SELECT max ( rating ) FROM Sailors WHERE name = 'Luis ' )

select name from sailors where rating > ( select max ( rating ) from sailors where name = value )

What is the name of all sailors whose rating is higher than all sailors named Luis?

What is the name of all sailors whose rating is higher than all sailors named Luis ?


Question: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id  =  T2.property_address_id WHERE T2.owner_user_id NOT IN ( SELECT owner_user_id FROM Properties GROUP BY owner_user_id HAVING count(*)  <=  2 );

SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id = T2.property_address_id WHERE T2.owner_user_id NOT IN ( SELECT owner_user_id FROM Properties GROUP BY owner_user_id HAVING count ( * ) < = 2 ) ;

select t1 . zip_postcode from addresses as t1 join properties as t2 on t1 . address_id = t2 . property_address_id where t2 . owner_user_id not in ( select owner_user_id from properties group by owner_user_id having count ( * ) < = value )

What are the zip codes of properties which do not belong to users who own at most 2 properties?

What are the zip codes of properties which do not belong to users who own at most 2 properties ?


Question: SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  'red' OR T1.color  =  "blue"

SELECT DISTINCT T2.sid , T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON T1.bid = T2.bid JOIN Sailors AS T3 ON T2.sid = T3.sid WHERE T1.color = 'red ' OR T1.color = `` blue ''

select distinct t2 . sid , t3 . name from boats as t1 join reserves as t2 on t1 . bid = t2 . bid join sailors as t3 on t2 . sid = t3 . sid where t1 . color = value or t1 . color = value

Find the name and id of Sailors (sid) that reserved red or blue boat.

Find the name and id of Sailors ( sid ) that reserved red or blue boat .


Question: SELECT name FROM movietheaters GROUP BY name HAVING count(*)  >=  1

SELECT name FROM movietheaters GROUP BY name HAVING count ( * ) > = 1

select name from movietheaters group by name having count ( * ) > = value

Find the name of theaters that has at least one movie playing.

Find the name of theaters that has at least one movie playing .


Question: SELECT name FROM Author WHERE author_id NOT 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")

SELECT name FROM Author WHERE author_id NOT 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 '' )

select name from author where author_id not 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 )

Find the name of authors who have never published a paper in ACL.

Find the name of authors who have never published a paper in ACL .


Question: SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver)

SELECT Team FROM team WHERE Team_ID NOT IN ( SELECT Team_ID FROM team_driver )

select team from team where team_id not in ( select team_id from team_driver )


Question: SELECT Last_Name FROM Students WHERE Gender_MFU != "M"

SELECT Last_Name FROM Students WHERE Gender_MFU ! = `` M ''

select last_name from students where gender_mfu ! = value

What are the last names of the students with gender other than "M"?

What are the last names of the students with gender other than `` M '' ?


Question: SELECT max(age) ,  pilot_name FROM pilotskills GROUP BY pilot_name

SELECT max ( age ) , pilot_name FROM pilotskills GROUP BY pilot_name

select max ( age ) , pilot_name from pilotskills group by pilot_name

Find the max age for each group of pilots with the same name.

Find the max age for each group of pilots with the same name .


Question: SELECT T1.Name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Wins_count  >  2

Show names of clubs that have players with more than 2 win counts.

Show names of clubs that have players with more than 2 win counts .


Question: SELECT city_name FROM City WHERE state  =  "PA"

SELECT city_name FROM City WHERE state = `` PA ''

select city_name from city where state = value


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

SELECT warehouse , avg ( value ) FROM boxes GROUP BY warehouse HAVING avg ( value ) > 150

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

What are the average values of boxes for each warehouse than has an average value greater than 150?

What are the average values of boxes for each warehouse than has an average value greater than 150 ?


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

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

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

Find the name of the movie theaters that are playing the movies whose rating is ‘G’.

Find the name of the movie theaters that are playing the movies whose rating is ‘G’ .


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

Return the first name and major of students are living in Baltimore?

Return the first name and major of students are living in Baltimore ?


Question: SELECT student_id ,  sum(amount_of_loan) FROM Student_Loans GROUP BY student_id

SELECT student_id , sum ( amount_of_loan ) FROM Student_Loans GROUP BY student_id

select student_id , sum ( amount_of_loan ) from student_loans group by student_id

For each student, find the student id and the total amount of loan he or she has.

For each student , find the student id and the total amount of loan he or she has .


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

What is the product type code with most number of products?

What is the product type code with most number of products ?


Question: SELECT T1.order_id ,  sum(T2.product_price) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.order_id ORDER BY sum(T2.product_price) ASC LIMIT 1

SELECT T1.order_id , sum ( T2.product_price ) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T1.order_id ORDER BY sum ( T2.product_price ) ASC LIMIT 1

Which order have the least sum of the product prices. List the order id and sum.

Which order have the least sum of the product prices . List the order id and sum .


Question: SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_processes

select document_id from documents except select document_id from documents_processes

Show all document ids without a process.

Show all document ids without a process .


Question: SELECT count(DISTINCT LOCATION) FROM hangar

SELECT count ( DISTINCT LOCATION ) FROM hangar

select count ( distinct location ) from hangar

Count the number of different locations of hangars.

Count the number of different locations of hangars .


Question: SELECT title FROM program ORDER BY start_year DESC

select title from program order by start_year desc

List all program titles in the order of starting year. List the most recent one first.

List all program titles in the order of starting year . List the most recent one first .


Question: SELECT count(*) FROM Addresses


Question: SELECT T2.Document_Object_ID FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID HAVING count(*)  >  1;

List document that have more than one child. List the document id.

List document that have more than one child . List the document id .


Question: SELECT flavor FROM goods WHERE food  =  "Cake" AND price  >  10

SELECT flavor FROM goods WHERE food = `` Cake '' AND price > 10

select flavor from goods where food = value and price > value

What are the flavors of cakes that cost more than 10 dollars?

What are the flavors of cakes that cost more than 10 dollars ?


Question: SELECT property_id ,  vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1;

SELECT property_id , vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1 ;

select property_id , vendor_requested_price from properties order by vendor_requested_price limit value

Which property had the lowest price requested by the vendor? List the id and the price.

Which property had the lowest price requested by the vendor ? List the id and the price .


Question: SELECT max(Chapters) ,  min(Chapters) FROM book

SELECT max ( Chapters ) , min ( Chapters ) FROM book

select max ( chapters ) , min ( chapters ) from book

What are the maximum and minimum number of chapters for each book?

What are the maximum and minimum number of chapters for each book ?


Question: SELECT count(*) FROM player WHERE Rank_of_the_year  <=  3

SELECT count ( * ) FROM player WHERE Rank_of_the_year < = 3

select count ( * ) from player where rank_of_the_year < = value

Count the number of players that have a rank of year of at most 3.

Count the number of players that have a rank of year of at most 3 .


Question: SELECT LOCATION FROM hangar ORDER BY plane_name

select location from hangar order by plane_name

Find all locations of planes sorted by the plane name.

Find all locations of planes sorted by the plane name .


Question: SELECT plane_name FROM pilotskills WHERE pilot_name  =  'Smith' AND age  =  41

SELECT plane_name FROM pilotskills WHERE pilot_name = 'Smith ' AND age = 41

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

Return the names of planes owned by the pilot whose name is Smith and is 41 years old.

Return the names of planes owned by the pilot whose name is Smith and is 41 years old .


Question: SELECT institution_name ,  LOCATION ,  founded FROM institution

select institution_name , location , founded from institution

Show the institution name, location and founded year of all institutions.

Show the institution name , location and founded year of all institutions .


Question: SELECT Country FROM player GROUP BY Country HAVING COUNT(*)  >  1

SELECT Country FROM player GROUP BY Country HAVING COUNT ( * ) > 1

select country from player group by country having count ( * ) > value

Which countries have produced more than one player?

Which countries have produced more than one player ?


Question: SELECT count(*) FROM Exams


Question: SELECT T1.feature_name ,  T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id  =  T2.feature_id GROUP BY T1.feature_name ORDER BY count(*) DESC LIMIT 1;

SELECT T1.feature_name , T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id = T2.feature_id GROUP BY T1.feature_name ORDER BY count ( * ) DESC LIMIT 1 ;

What are the feature name and description of the most commonly seen feature across properties?

What are the feature name and description of the most commonly seen feature across properties ?


Question: SELECT T1.ReceiptNumber FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id JOIN customers AS T4 ON T4.Id  =  T1.CustomerId WHERE T3.food  =  "Croissant" AND T4.LastName  =  'LOGAN'

SELECT T1.ReceiptNumber FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber = T2.receipt JOIN goods AS T3 ON T2.item = T3.id JOIN customers AS T4 ON T4.Id = T1.CustomerId WHERE T3.food = `` Croissant '' AND T4.LastName = 'LOGAN '

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

What are the receipt numbers for a customer with the last name Logan who purchased a croissant?

What are the receipt numbers for a customer with the last name Logan who purchased a croissant ?


Question: SELECT DISTINCT LastName FROM customers ORDER BY LastName

select distinct lastname from customers order by lastname

List the last names of all customers in an alphabetical order.

List the last names of all customers in an alphabetical order .


Question: SELECT count(*) FROM customer


Question: SELECT T1.deathYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) LIMIT 1

SELECT T1.deathYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID GROUP BY T2.sculptorID ORDER BY count ( * ) LIMIT 1

select t1 . deathyear from artists as t1 join sculptures as t2 on t1 . artistid = t2 . sculptorid group by t2 . sculptorid order by count ( * ) limit value

Find the death year of the artist who made the least number of sculptures?

Find the death year of the artist who made the least number of sculptures ?


Question: SELECT Transmitter FROM radio WHERE ERP_kW  >  150 OR ERP_kW  <  30

select transmitter from radio where erp_kw > value or erp_kw < value

Show the transmitters of radios whose ERP is bigger than 150 or smaller than 30.

Show the transmitters of radios whose ERP is bigger than 150 or smaller than 30 .


Question: SELECT sum(T1.Number_of_Championships) FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID WHERE T2.Affiliation  =  "Public"

SELECT sum ( T1.Number_of_Championships ) FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID WHERE T2.Affiliation = `` Public ''

select sum ( t1 . number_of_championships ) from championship as t1 join institution as t2 on t1 . institution_id = t2 . institution_id where t2 . affiliation = value

Return the total number of championships of institutions that have a Public affiliation.

Return the total number of championships of institutions that have a Public affiliation .


Question: SELECT first_name ,  middle_name ,  last_name FROM Properties AS T1 JOIN Users AS T2 ON T1.owner_user_id  =  T2.user_id WHERE T1.property_address_id  =  T2.user_address_id;

Return the full names of users who live in properties that they own.

Return the full names of users who live in properties that they own .


Question: SELECT count(*) FROM Products WHERE product_type_code  =  "Hardware"

SELECT count ( * ) FROM Products WHERE product_type_code = `` Hardware ''

select count ( * ) from products where product_type_code = value

Count the number of products of the type Hardware.

Count the number of products of the type Hardware .


Question: SELECT model FROM headphone ORDER BY price DESC LIMIT 1

select model from headphone order by price desc limit value

Which headphone model has the highest price?

Which headphone model has the highest price ?


Question: SELECT count(*) FROM Invoices


Question: SELECT Last_Name FROM Students WHERE Gender_MFU  =  "F" OR Gender_MFU  =  "M"

SELECT Last_Name FROM Students WHERE Gender_MFU = `` F '' OR Gender_MFU = `` M ''

select last_name from students where gender_mfu = value or gender_mfu = value

List the last names of the students whose gender is "F" or "M".

List the last names of the students whose gender is `` F '' or `` M '' .


Question: SELECT count(*) ,  book_series FROM book GROUP BY book_series

SELECT count ( * ) , book_series FROM book GROUP BY book_series

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

How many books does each book series have? Return the counts and book series.

How many books does each book series have ? Return the counts and book series .


Question: SELECT staff_id ,  count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;

SELECT staff_id , count ( * ) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count ( * ) ASC LIMIT 1 ;

select staff_id , count ( * ) from staff_in_meetings group by staff_id order by count ( * ) asc limit value

What is the staff id of the staff who attended the least meetings but attended some meeting?

What is the staff id of the staff who attended the least meetings but attended some meeting ?


Question: SELECT T1.client_id ,  T2.client_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id ORDER BY count(*) DESC LIMIT 1

SELECT T1.client_id , T2.client_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id = T2.client_id GROUP BY T1.client_id ORDER BY count ( * ) DESC LIMIT 1

select t1 . client_id , t2 . client_details from invoices as t1 join clients as t2 on t1 . client_id = t2 . client_id group by t1 . client_id order by count ( * ) desc limit value

What are the client id and details for the client with the most invoices?

What are the client id and details for the client with the most invoices ?


Question: SELECT author_name FROM Documents GROUP BY author_name HAVING count(*)  >=  2

SELECT author_name FROM Documents GROUP BY author_name HAVING count ( * ) > = 2

select author_name from documents group by author_name having count ( * ) > = value

Show the names for authors with at least two documents.

Show the names for authors with at least two documents .


Question: SELECT product_size FROM Products WHERE product_name LIKE '%Dell%'

SELECT product_size FROM Products WHERE product_name LIKE ' % Dell % '

select product_size from products where product_name like value

What are the product sizes of the products whose name has the substring 'Dell'?

What are the product sizes of the products whose name has the substring 'Dell ' ?


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 )

Show all customer names with the  payment method code used by least number of customers.

Show all customer names with the payment method code used by least number of customers .


Question: SELECT T1.Collection_Name FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID JOIN Document_Objects AS T3 ON T2.Document_object_id  =  T3.Document_object_id WHERE T3.owner  =  'Ransom'

What is the collection name of a document owned by 'Ransom'?

What is the collection name of a document owned by 'Ransom ' ?


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

what are the average and maximum profit of a year for all presses?

what are the average and maximum profit of a year for all presses ?


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

Please list the title and platform name of games.

Please list the title and platform name of games .


Question: SELECT DISTINCT T2.stage_presence FROM songs AS T1 JOIN performance_score AS T2 ON T1.id  =  T2.songs_id WHERE T1.language  =  'English'

select distinct t2 . stage_presence from songs as t1 join performance_score as t2 on t1 . id = t2 . songs_id where t1 . language = value

What are the distinct stage presence scores for all the songs that are in language 'English' ?

What are the distinct stage presence scores for all the songs that are in language 'English ' ?


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"

What are the names of the university with an Accounting major ranked 3 or higher?

What are the names of the university with an Accounting major ranked 3 or higher ?


Question: select t1.order_id ,  t1.date_order_placed ,  sum(t3.product_price) from orders as t1 join order_items as t2 on t1.order_id  =  t2.order_id join products as t3 on t2.product_id  =  t3.product_id group by t1.order_id

What are the total cost of all the orders ? List the order id , date , and total cost .


Question: SELECT count(*) ,  T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID

SELECT count ( * ) , T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID

For each document object id, how many collections does it belong to?

For each document object id , how many collections does it belong to ?


Question: SELECT Type_of_Question_Code ,  COUNT(*) FROM Questions GROUP BY Type_of_Question_Code

SELECT Type_of_Question_Code , COUNT ( * ) FROM Questions GROUP BY Type_of_Question_Code

select type_of_question_code , count ( * ) from questions group by type_of_question_code

What are the type of questions and their counts?

What are the type of questions and their counts ?


Question: SELECT sum(population) FROM district ORDER BY area_km DESC LIMIT 3

SELECT sum ( population ) FROM district ORDER BY area_km DESC LIMIT 3

select sum ( population ) from district order by area_km desc limit value

What is the total population of the districts whose areas are in the top 3?

What is the total population of the districts whose areas are in the top 3 ?


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

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

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

What are the codes of boxes stored in warehouses in either Chicago or New York?

What are the codes of boxes stored in warehouses in either Chicago or New York ?


Question: SELECT sum(Points) ,  avg(Points) FROM driver

SELECT sum ( Points ) , avg ( Points ) FROM driver

select sum ( points ) , avg ( points ) from driver

What are the total and average points of drivers?

What are the total and average points of drivers ?


Question: SELECT id ,  flavor FROM goods WHERE food  =  "Cake" ORDER BY flavor

SELECT id , flavor FROM goods WHERE food = `` Cake '' ORDER BY flavor

select id , flavor from goods where food = value order by flavor

What are the ids and flavors of cakes, ordered by flavor?

What are the ids and flavors of cakes , ordered by flavor ?


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

Which customer has used the most types of services ? Give me the customer details .


Question: SELECT Card_Credit FROM customer ORDER BY Level_of_Membership DESC LIMIT 1

select card_credit from customer order by level_of_membership desc limit value

Find the customer with the highest membership level and return his or her card credit.

Find the customer with the highest membership level and return his or her card credit .


Question: SELECT min(date_order_placed) FROM Orders UNION SELECT T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id HAVING count(*)  >  1

SELECT min ( date_order_placed ) FROM Orders UNION SELECT T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id HAVING count ( * ) > 1

select min ( date_order_placed ) from orders union select t1 . date_order_placed from orders as t1 join order_items as t2 on t1 . order_id = t2 . order_id group by t1 . order_id having count ( * ) > value

What are the dates of the earliest order and the dates of all orders with more than 1 item?

What are the dates of the earliest order and the dates of all orders with more than 1 item ?


Question: SELECT name FROM press ORDER BY Month_Profits_billion DESC LIMIT 1

select name from press order by month_profits_billion desc limit value

Find the name of the publisher whose monthly profit is the highest.

Find the name of the publisher whose monthly profit is the highest .


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

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

What are the names of the movies that are played in any theater and the name of the corresponding theater?

What are the names of the movies that are played in any theater and the name of the corresponding theater ?


Question: SELECT id FROM goods WHERE food  =  "Cookie" AND price  <  (SELECT min(price) FROM goods WHERE food  =  'Croissant')

SELECT id FROM goods WHERE food = `` Cookie '' AND price < ( SELECT min ( price ) FROM goods WHERE food = 'Croissant ' )

select id from goods where food = value and price < ( select min ( price ) from goods where food = value )

What are the ids of Cookies whose price is lower than any Croissant?

What are the ids of Cookies whose price is lower than any Croissant ?


Question: SELECT T2.name ,  sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id  =  T2.id GROUP BY T2.id

select t2 . name , sum ( t1 . total_hours ) from renting_history as t1 join vehicles as t2 on t1 . vehicles_id = t2 . id group by t2 . id

Show the name and total hours of renting for each vehicle.

Show the name and total hours of renting for each vehicle .


Question: SELECT agency_id ,  count(*) FROM Clients GROUP BY agency_id

SELECT agency_id , count ( * ) FROM Clients GROUP BY agency_id

select agency_id , count ( * ) from clients group by agency_id

How many clients does each agency have ?


Question: select count(*) from citation 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"

select
count
(
*
)
from
citation
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"

select count ( * ) from citation 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 = value

Count the number of papers Mckeown , Kathleen has cited .


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

SELECT T1.id , T1.name FROM songs AS T1 JOIN performance_score AS T2 ON T1.id = T2.songs_id GROUP BY T1.id ORDER BY count ( * ) DESC LIMIT 1

select t1 . id , t1 . name from songs as t1 join performance_score as t2 on t1 . id = t2 . songs_id group by t1 . id order by count ( * ) desc limit value

What are the id and name of the song sung by the most participants?

What are the id and name of the song sung by the most participants ?


Question: SELECT count(*) ,  venue ,  YEAR FROM Paper GROUP BY venue ,  YEAR

SELECT count ( * ) , venue , YEAR FROM Paper GROUP BY venue , YEAR

select count ( * ) , venue , year from paper group by venue , year

How many papers are published in each venue in each year?

How many papers are published in each venue in each year ?


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

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

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

Find the name of all movies that are not played in Odeon theater.

Find the name of all movies that are not played in Odeon theater .


Question: SELECT name FROM countries ORDER BY education_score DESC

select name from countries order by education_score desc

List names of countries in descending order of education_score.

List names of countries in descending order of education_score .


Question: SELECT T1.fname ,  count(*) FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID GROUP BY T2.painterID HAVING count(*)  >=  2

SELECT T1.fname , count ( * ) FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID = T2.painterID GROUP BY T2.painterID HAVING count ( * ) > = 2

select t1 . fname , count ( * ) from artists as t1 join paintings as t2 on t1 . artistid = t2 . painterid group by t2 . painterid having count ( * ) > = value

Find the first names and number of works of all artists who have at least two paintings?

Find the first names and number of works of all artists who have at least two paintings ?


Question: SELECT client_id FROM Invoices GROUP BY client_id HAVING count(*)  >=  2

SELECT client_id FROM Invoices GROUP BY client_id HAVING count ( * ) > = 2

select client_id from invoices group by client_id having count ( * ) > = value

What are client ids for clients with at least 2 invoices.

What are client ids for clients with at least 2 invoices .


Question: SELECT model ,  build_year FROM vehicle WHERE model LIKE '%DJ%'

SELECT model , build_year FROM vehicle WHERE model LIKE ' % DJ % '

select model , build_year from vehicle where model like value

Return the model and build year of cars that include "DJ" in their model names.

Return the model and build year of cars that include `` DJ '' in their model names .


Question: SELECT count(pilot_name) FROM pilotskills ORDER BY age  >  40 OR age  <  30

SELECT count ( pilot_name ) FROM pilotskills ORDER BY age > 40 OR age < 30

select count ( pilot_name ) from pilotskills order by age > value or age < value

How many pilots who are older than 40 or younger than 30?

How many pilots who are older than 40 or younger than 30 ?


Question: SELECT avg(age) ,  Make FROM driver GROUP BY make

SELECT avg ( age ) , Make FROM driver GROUP BY make

select avg ( age ) , make from driver group by make

What is the average age of drivers for each make? Return the average age and make.

What is the average age of drivers for each make ? Return the average age and make .


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 ''

What is the average number of units sold in millions of games played by players with position "Guard"?

What is the average number of units sold in millions of games played by players with position `` Guard '' ?


Question: SELECT count(*) FROM driver WHERE Racing_Series  =  'NASCAR'

SELECT count ( * ) FROM driver WHERE Racing_Series = 'NASCAR '

select count ( * ) from driver where racing_series = value

Count the number of drivers who have raced in NASCAR.

Count the number of drivers who have raced in NASCAR .


Question: SELECT T1.city_name ,  count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code GROUP BY T1.city_code

SELECT T1.city_name , count ( * ) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.city_code

select t1 . city_name , count ( * ) from city as t1 join student as t2 on t1 . city_code = t2 . city_code group by t1 . city_code

Find the number of students living in each city.

Find the number of students living in each city .


Question: SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1

SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id = T2.id GROUP BY T2.id ORDER BY COUNT ( * ) DESC LIMIT 1

select t2 . name from official_languages as t1 join languages as t2 on t1 . language_id = t2 . id group by t2 . id order by count ( * ) desc limit value

What is the official language that is most common?

What is the official language that is most common ?


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

What are the minimum, maximum, and average annual fuel costs across all vehicles?

What are the minimum , maximum , and average annual fuel costs across all vehicles ?


Question: SELECT T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T2.Points  >  150

select t1 . country from country as t1 join driver as t2 on t1 . country_id = t2 . country where t2 . points > value

What are the countries that have drivers with points larger than 150?

What are the countries that have drivers with points larger than 150 ?


Question: SELECT Franchise FROM game GROUP BY Franchise ORDER BY COUNT(*) DESC LIMIT 1

SELECT Franchise FROM game GROUP BY Franchise ORDER BY COUNT ( * ) DESC LIMIT 1

select franchise from game group by franchise order by count ( * ) desc limit value