Question: SELECT DISTINCT Address FROM building

Question: Show the distinct addresses of buildings.

Show the distinct addresses of buildings .


Question: SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id WHERE T2.rank  >=  5

SELECT sum ( enrollment ) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T2.rank > = 5

select sum ( enrollment ) from university as t1 join overall_ranking as t2 on t1 . university_id = t2 . university_id where t2 . rank > = value

Question: What is the total enrollment of universities with a overall rank 5 or below?

What is the total enrollment of universities with a overall rank 5 or below ?


Question: SELECT heat ,  name ,  nation FROM cyclist

select heat , name , nation from cyclist

Question: List the heat, name, and nation for all the cyclists.

List the heat , name , and nation for all the cyclists .


Question: SELECT Completed_Year ,  COUNT(*) FROM building GROUP BY Completed_Year

SELECT Completed_Year , COUNT ( * ) FROM building GROUP BY Completed_Year

select completed_year , count ( * ) from building group by completed_year

Question: For completion year, return the year and the number of buildings completed.

For completion year , return the year and the number of buildings completed .


Question: SELECT count(DISTINCT plane_name) FROM pilotskills

SELECT count ( DISTINCT plane_name ) FROM pilotskills

select count ( distinct plane_name ) from pilotskills

Question: How many distinct planes are owned across all pilots?

How many distinct planes are owned across all pilots ?


Question: SELECT DISTINCT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Normal"

SELECT DISTINCT Student_Answer_Text FROM Student_Answers WHERE Comments = `` Normal ''

select distinct student_answer_text from student_answers where comments = value

Question: What are the distinct student answer texts that received comments "Normal"?

What are the distinct student answer texts that received comments `` Normal '' ?


Question: SELECT paper_id ,  title FROM Paper WHERE paper_id NOT IN (SELECT cited_paper_id FROM Citation)

SELECT paper_id , title FROM Paper WHERE paper_id NOT IN ( SELECT cited_paper_id FROM Citation )

select paper_id , title from paper where paper_id not in ( select cited_paper_id from citation )

Question: Find the id and title of the papers that are never cited by others.

Find the id and title of the papers that are never cited by others .


Question: SELECT T2.customer_name ,  T1.customer_id ,  count(*) FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id

SELECT T2.customer_name , T1.customer_id , count ( * ) FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id

Question: Show all customer names, ids and the number of orders by each customer.

Show all customer names , ids and the number of orders by each customer .


Question: SELECT T3.title ,  T1.name FROM Author AS T1 JOIN Author_Book AS T2 ON T2.Author  =  T1.idAuthor JOIN Book AS T3 ON T2.isbn  =  T3.isbn

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

Question: Show all book titles and corresponding author names.

Show all book titles and corresponding author names .


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

SELECT * FROM movies WHERE rating = 'null '

select * from movies where rating = value

Question: What is all the information about the unrated movies?

What is all the information about the unrated movies ?


Question: SELECT title FROM paintings WHERE YEAR  >  1910 AND medium  =  "oil"

SELECT title FROM paintings WHERE YEAR > 1910 AND medium = `` oil ''

select title from paintings where year > value and medium = value

Question: Give the names of all oil paintings created after 1910.

Give the names of all oil paintings created after 1910 .


Question: SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "Pride and Prejudice" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "The Little Prince"

SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = `` Pride and Prejudice '' INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn = T2.isbn WHERE T1.title = `` The Little Prince ''

select idorder from book as t1 join books_order as t2 on t1 . isbn = t2 . isbn where t1 . title = value intersect select idorder from book as t1 join books_order as t2 on t1 . isbn = t2 . isbn where t1 . title = value

Question: Show ids for orders including both "Pride and Prejudice" and "The Little Prince".

Show ids for orders including both `` Pride and Prejudice '' and `` The Little Prince '' .


Question: SELECT avg(room_count) FROM Properties;

SELECT avg ( room_count ) FROM Properties ;

select avg ( room_count ) from properties

Question: On average, how many rooms does a property have?

On average , how many rooms does a property have ?


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

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

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

Question: return the details of the customer with largest count of used services.


Question: SELECT T1.order_id ,  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(*)  >=  2

SELECT T1.order_id , 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 ( * ) > = 2

Question: Which orders have at least 2 products on it? List the order id and date.

Which orders have at least 2 products on it ? List the order id and date .


Question: SELECT address_line_1 ,  town_city ,  county FROM Customers WHERE Country  =  'USA'

SELECT address_line_1 , town_city , county FROM Customers WHERE Country = 'USA '

select address_line_1 , town_city , county from customers where country = value

Question: What are the addresses, towns, and county information for all customers who live in the United States?

What are the addresses , towns , and county information for all customers who live in the United States ?


Question: SELECT name ,  rating ,  age FROM Sailors ORDER BY rating ,  age

select name , rating , age from sailors order by rating , age

Question: Find the name, rating and age of all sailors ordered by rating and age.

Find the name , rating and age of all sailors ordered by rating and age .


Question: SELECT name FROM press WHERE Month_Profits_billion  =  (SELECT min(Month_Profits_billion) FROM press) OR Month_Profits_billion  =  (SELECT max(Month_Profits_billion) FROM press)

SELECT name FROM press WHERE Month_Profits_billion = ( SELECT min ( Month_Profits_billion ) FROM press ) OR Month_Profits_billion = ( SELECT max ( Month_Profits_billion ) FROM press )

select name from press where month_profits_billion = ( select min ( month_profits_billion ) from press ) or month_profits_billion = ( select max ( month_profits_billion ) from press )

Question: What are the names of the press that makes the highest monthly profit or the lowest monthly profit?

What are the names of the press that makes the highest monthly profit or the lowest monthly profit ?


Question: SELECT author_name FROM Documents GROUP BY author_name ORDER BY count(*) DESC LIMIT 1

SELECT author_name FROM Documents GROUP BY author_name ORDER BY count ( * ) DESC LIMIT 1

select author_name from documents group by author_name order by count ( * ) desc limit value

Question: What is the name of the author with most number of documents?

What is the name of the author with most number of documents ?


Question: SELECT Collection_Name FROM Collections EXCEPT SELECT T2.Collection_Name FROM Collections AS T1 JOIN Collections AS T2 ON T1.Parent_Collection_ID = T2.Collection_ID;

SELECT Collection_Name FROM Collections EXCEPT SELECT T2.Collection_Name FROM Collections AS T1 JOIN Collections AS T2 ON T1.Parent_Collection_ID = T2.Collection_ID ;

Question: Which collection is not the parent of other collection? List the collection's name.

Which collection is not the parent of other collection ? List the collection 's name .


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

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

Question: Find the ids of customers whose average spending for each good is above 5.

Find the ids of customers whose average spending for each good is above 5 .


Question: SELECT avg(Card_Credit) FROM customer WHERE Level_of_Membership  >  1

SELECT avg ( Card_Credit ) FROM customer WHERE Level_of_Membership > 1

select avg ( card_credit ) from customer where level_of_membership > value

Question: Find the average card credit customers whose membership level is above 1.

Find the average card credit customers whose membership level is above 1 .


Question: SELECT DISTINCT bid FROM Reserves

Question: Return the unique boat ids (bid) of all reserved boats.

Return the unique boat ids ( bid ) of all reserved boats .


Question: SELECT max(T1.value) ,  T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.location

SELECT max ( T1.value ) , T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code GROUP BY T2.location

select max ( t1 . value ) , t2 . location from boxes as t1 join warehouses as t2 on t1 . warehouse = t2 . code group by t2 . location

Question: For each warehouse location, what is the value of the most expensive box?

For each warehouse location , what is the value of the most expensive box ?


Question: SELECT Affiliation ,  COUNT(*) FROM city_channel GROUP BY Affiliation

SELECT Affiliation , COUNT ( * ) FROM city_channel GROUP BY Affiliation

select affiliation , count ( * ) from city_channel group by affiliation

Question: Show the different affiliations of city channels and the number of city channels with each affiliation.

Show the different affiliations of city channels and the number of city channels with each affiliation .


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

Question: What are the 10 most cited papers, and how many citations did each have?

What are the 10 most cited papers , and how many citations did each have ?


Question: SELECT staff_role_code ,  staff_role_description FROM Ref_staff_roles

Question: List the codes and descriptions for all staff roles.

List the codes and descriptions for all staff roles .


Question: select channel_details from channels order by channel_details

Question: What is the list of channel details ordered alphabetically ?


Question: SELECT * FROM warehouses

Question: What is all the information about the warehouses?

What is all the information about the warehouses ?


Question: select sum(enrollment) from institution where city  =  "vancouver" or city  =  "calgary"

select sum ( enrollment ) from institution where city = "vancouver" or city = "calgary"

select sum ( enrollment ) from institution where city = value or city = value

Question: Return all the enrollments of institutions in either the city of Vancouver or the city of Calgary .


Question: SELECT count(*) FROM Shipment_Items

Question: How many products have been shipped?


Question: SELECT Make FROM driver GROUP BY Make ORDER BY COUNT(*) DESC LIMIT 1

SELECT Make FROM driver GROUP BY Make ORDER BY COUNT ( * ) DESC LIMIT 1

select make from driver group by make order by count ( * ) desc limit value

Question: List the make that are associated with most drivers.

List the make that are associated with most drivers .


Question: SELECT title ,  YEAR FROM sculptures WHERE LOCATION != "Gallery 226"

SELECT title , YEAR FROM sculptures WHERE LOCATION ! = `` Gallery 226 ''

select title , year from sculptures where location ! = value

Question: What are the names and dates created for all sculptures not located in gallery 226?

What are the names and dates created for all sculptures not located in gallery 226 ?


Question: SELECT T2.Driver ,  T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country

select t2 . driver , t1 . country from country as t1 join driver as t2 on t1 . country_id = t2 . country

Question: For each driver, return his or her name and country.

For each driver , return his or her name and country .


Question: SELECT DISTINCT id FROM goods ORDER BY id

select distinct id from goods order by id

Question: Order the distinct good ids.


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

Question: Show names of players and names of clubs they are in.

Show names of players and names of clubs they are in .


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

SELECT avg ( Laps ) FROM driver WHERE age < 20

select avg ( laps ) from driver where age < value

Question: What are the average laps of all the drivers who are younger than 20?

What are the average laps of all the drivers who are younger than 20 ?


Question: SELECT count(*) FROM institution WHERE founded BETWEEN 1850 AND 1900

SELECT count ( * ) FROM institution WHERE founded BETWEEN 1850 AND 1900

select count ( * ) from institution where founded between value and value

Question: How many institution are founded between 1850 and 1900?

How many institution are founded between 1850 and 1900 ?


Question: SELECT paintingID FROM paintings WHERE height_mm  >   (SELECT max(height_mm) FROM paintings WHERE YEAR  >  1900)

SELECT paintingID FROM paintings WHERE height_mm > ( SELECT max ( height_mm ) FROM paintings WHERE YEAR > 1900 )

select paintingid from paintings where height_mm > ( select max ( height_mm ) from paintings where year > value )

Question: What are the ids of the paintings whose height is longer than the height of all paintings created after 1900?

What are the ids of the paintings whose height is longer than the height of all paintings created after 1900 ?


Question: SELECT product_type_code FROM Products GROUP BY product_type_code HAVING count(*)  >=  2

SELECT product_type_code FROM Products GROUP BY product_type_code HAVING count ( * ) > = 2

select product_type_code from products group by product_type_code having count ( * ) > = value

Question: What are the product type code with at least two products?

What are the product type code with at least two products ?


Question: SELECT Driver_Name FROM driver ORDER BY Driver_Name DESC

select driver_name from driver order by driver_name desc

Question: List all names of drivers in descending alphabetical order.

List all names of drivers in descending alphabetical order .


Question: SELECT count(DISTINCT T1.paper_id) 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 T1.year  >=  2000 AND T1.year  <=  2009 AND T3.name LIKE "Stanford University"

SELECT count ( DISTINCT T1.paper_id ) 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 T1.year > = 2000 AND T1.year < = 2009 AND T3.name LIKE `` Stanford University ''

select count ( distinct t1 . paper_id ) 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 t1 . year > = value and t1 . year < = value and t3 . name like value

Question: How many papers does Stanford University have between 2000 and 2009?

How many papers does Stanford University have between 2000 and 2009 ?


Question: SELECT staff_id ,  staff_details FROM staff WHERE staff_details LIKE "%s%" GROUP BY staff_id HAVING count(*)  >=  1

SELECT staff_id , staff_details FROM staff WHERE staff_details LIKE `` % s % '' GROUP BY staff_id HAVING count ( * ) > = 1

select staff_id , staff_details from staff where staff_details like value group by staff_id having count ( * ) > = value

Question: What are the ids and details of the staff who have attended at least 1 meetings and have the detail with letter 's'?

What are the ids and details of the staff who have attended at least 1 meetings and have the detail with letter 's ' ?


Question: SELECT build_year ,  model ,  builder FROM vehicle

select build_year , model , builder from vehicle

Question: Give the build year, model, and builder of each vehicle.

Give the build year , model , and builder of each vehicle .


Question: SELECT Type_of_Question_Code FROM Questions GROUP BY Type_of_Question_Code HAVING count(*)  >=  3

SELECT Type_of_Question_Code FROM Questions GROUP BY Type_of_Question_Code HAVING count ( * ) > = 3

select type_of_question_code from questions group by type_of_question_code having count ( * ) > = value

Question: Show the types of questions that have at least three questions.

Show the types of questions that have at least three questions .


Question: SELECT city_name ,  city_code ,  state ,  country FROM City

select city_name , city_code , state , country from city

Question: Show names, codes, states, countries for all cities.

Show names , codes , states , countries for all cities .


Question: SELECT T2.name ,  sum(T3.amount) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient  =  T2.idClient JOIN Books_Order AS T3 ON T3.idOrder  =  T1.idOrder GROUP BY T1.idClient

select t2 . name , sum ( t3 . amount ) from orders as t1 join client as t2 on t1 . idclient = t2 . idclient join books_order as t3 on t3 . idorder = t1 . idorder group by t1 . idclient

Question: Show the client names and their total amounts of books ordered.

Show the client names and their total amounts of books ordered .


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

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

Question: For each student, find the student id, student biographical data, and the number of courses he or she takes.

For each student , find the student id , student biographical data , and the number of courses he or she takes .


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

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

Question: On which date did some customer buy a good that costs more than 15 dollars?

On which date did some customer buy a good that costs more than 15 dollars ?


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

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

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

Question: What is the name of the affiliation which publishes the greatest number of papers among those whose address contains 'China'.

What is the name of the affiliation which publishes the greatest number of papers among those whose address contains 'China ' .