db_id large_stringclasses 40
values | query large_stringlengths 22 608 | query_toks listlengths 4 75 | query_toks_no_value listlengths 4 101 | question large_stringlengths 22 185 | question_toks listlengths 5 36 | context large_stringclasses 40
values |
|---|---|---|---|---|---|---|
bakery_1 | SELECT DISTINCT T1.item FROM items AS T1 JOIN goods AS T2 ON T1.item = T2.id WHERE T2.flavor = "Chocolate" GROUP BY item HAVING count(*) <= 10 | [
"SELECT",
"DISTINCT",
"T1.item",
"FROM",
"items",
"AS",
"T1",
"JOIN",
"goods",
"AS",
"T2",
"ON",
"T1.item",
"=",
"T2.id",
"WHERE",
"T2.flavor",
"=",
"``",
"Chocolate",
"''",
"GROUP",
"BY",
"item",
"HAVING",
"count",
"(",
"*",
")",
"<",
"=",
"10"
] | [
"select",
"distinct",
"t1",
".",
"item",
"from",
"items",
"as",
"t1",
"join",
"goods",
"as",
"t2",
"on",
"t1",
".",
"item",
"=",
"t2",
".",
"id",
"where",
"t2",
".",
"flavor",
"=",
"value",
"group",
"by",
"item",
"having",
"count",
"(",
"*",
")",
... | What are the items with chocolate flavor that were purchased at most 10 times. | [
"What",
"are",
"the",
"items",
"with",
"chocolate",
"flavor",
"that",
"were",
"purchased",
"at",
"most",
"10",
"times",
"."
] | CREATE TABLE customers (
Id NUMBER PRIMARY KEY,
LastName TEXT,
FirstName TEXT
);
CREATE TABLE goods (
Id TEXT PRIMARY KEY,
Flavor TEXT,
Food TEXT,
Price NUMBER
);
CREATE TABLE items (
Receipt NUMBER PRIMARY KEY,
Ordinal NUMBER,
Item TEXT,
FOREIGN KEY (Item) REFERENCES goods(Id)
);
CREATE TABLE rec... |
bakery_1 | SELECT DISTINCT LastName FROM customers ORDER BY LastName | [
"SELECT",
"DISTINCT",
"LastName",
"FROM",
"customers",
"ORDER",
"BY",
"LastName"
] | [
"select",
"distinct",
"lastname",
"from",
"customers",
"order",
"by",
"lastname"
] | What are the last names of the customers in alphabetical order? | [
"What",
"are",
"the",
"last",
"names",
"of",
"the",
"customers",
"in",
"alphabetical",
"order",
"?"
] | CREATE TABLE customers (
Id NUMBER PRIMARY KEY,
LastName TEXT,
FirstName TEXT
);
CREATE TABLE goods (
Id TEXT PRIMARY KEY,
Flavor TEXT,
Food TEXT,
Price NUMBER
);
CREATE TABLE items (
Receipt NUMBER PRIMARY KEY,
Ordinal NUMBER,
Item TEXT,
FOREIGN KEY (Item) REFERENCES goods(Id)
);
CREATE TABLE rec... |
planet_1 | SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID WHERE T2.Name = "Mars"; | [
"SELECT",
"T1.ShipmentID",
"FROM",
"Shipment",
"AS",
"T1",
"JOIN",
"Planet",
"AS",
"T2",
"ON",
"T1.Planet",
"=",
"T2.PlanetID",
"WHERE",
"T2.Name",
"=",
"``",
"Mars",
"''",
";"
] | [
"select",
"t1",
".",
"shipmentid",
"from",
"shipment",
"as",
"t1",
"join",
"planet",
"as",
"t2",
"on",
"t1",
".",
"planet",
"=",
"t2",
".",
"planetid",
"where",
"t2",
".",
"name",
"=",
"value"
] | List all shipment ids for the planet Mars. | [
"List",
"all",
"shipment",
"ids",
"for",
"the",
"planet",
"Mars",
"."
] | CREATE TABLE Employee (
EmployeeID NUMBER PRIMARY KEY,
Name TEXT,
Position TEXT,
Salary NUMBER,
Remarks TEXT
);
CREATE TABLE Planet (
PlanetID NUMBER PRIMARY KEY,
Name TEXT,
Coordinates NUMBER
);
CREATE TABLE Shipment (
ShipmentID NUMBER PRIMARY KEY,
Date TIME,
Manager NUMBER,
Planet NUMBER,
F... |
pilot_1 | SELECT count(*) , plane_name FROM pilotskills GROUP BY plane_name HAVING avg(age) < 35 | [
"SELECT",
"count",
"(",
"*",
")",
",",
"plane_name",
"FROM",
"pilotskills",
"GROUP",
"BY",
"plane_name",
"HAVING",
"avg",
"(",
"age",
")",
"<",
"35"
] | [
"select",
"count",
"(",
"*",
")",
",",
"plane_name",
"from",
"pilotskills",
"group",
"by",
"plane_name",
"having",
"avg",
"(",
"age",
")",
"<",
"value"
] | What are the different plane names of planes with an average pilot age of below 35, and how many pilots have flown each of them? | [
"What",
"are",
"the",
"different",
"plane",
"names",
"of",
"planes",
"with",
"an",
"average",
"pilot",
"age",
"of",
"below",
"35",
",",
"and",
"how",
"many",
"pilots",
"have",
"flown",
"each",
"of",
"them",
"?"
] | CREATE TABLE PilotSkills (
pilot_name TEXT PRIMARY KEY,
plane_name TEXT,
age NUMBER,
FOREIGN KEY (plane_name) REFERENCES Hangar(plane_name)
);
CREATE TABLE Hangar (
plane_name TEXT PRIMARY KEY,
location TEXT
); |
real_estate_rentals | 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",
"''",
";"
] | [
"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",
"value"
] | What are the age categories for users whose description contains the string Mother? | [
"What",
"are",
"the",
"age",
"categories",
"for",
"users",
"whose",
"description",
"contains",
"the",
"string",
"Mother",
"?"
] | CREATE TABLE Ref_Age_Categories (
age_category_code TEXT PRIMARY KEY,
age_category_description TEXT
);
CREATE TABLE Ref_Property_Types (
property_type_code TEXT PRIMARY KEY,
property_type_description TEXT
);
CREATE TABLE Ref_Room_Types (
room_type_code TEXT PRIMARY KEY,
room_type_description TEXT
);
CREATE ... |
headphone_store | SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id = t2.store_id | [
"SELECT",
"Neighborhood",
"FROM",
"store",
"EXCEPT",
"SELECT",
"t1.Neighborhood",
"FROM",
"store",
"AS",
"t1",
"JOIN",
"stock",
"AS",
"t2",
"ON",
"t1.store_id",
"=",
"t2.store_id"
] | [
"select",
"neighborhood",
"from",
"store",
"except",
"select",
"t1",
".",
"neighborhood",
"from",
"store",
"as",
"t1",
"join",
"stock",
"as",
"t2",
"on",
"t1",
".",
"store_id",
"=",
"t2",
".",
"store_id"
] | Which neighborhood does not have any headphone in stock? | [
"Which",
"neighborhood",
"does",
"not",
"have",
"any",
"headphone",
"in",
"stock",
"?"
] | CREATE TABLE headphone (
Headphone_ID NUMBER PRIMARY KEY,
Model TEXT,
Class TEXT,
Driver-matched_dB NUMBER,
Construction TEXT,
Earpads TEXT,
Price NUMBER
);
CREATE TABLE store (
Store_ID NUMBER PRIMARY KEY,
Name TEXT,
Neighborhood TEXT,
Parking TEXT,
Date_Opened TEXT
);
CREATE TABLE stock (
St... |
cre_Doc_Workflow | SELECT process_id , count(*) FROM Documents_processes GROUP BY process_id | [
"SELECT",
"process_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Documents_processes",
"GROUP",
"BY",
"process_id"
] | [
"select",
"process_id",
",",
"count",
"(",
"*",
")",
"from",
"documents_processes",
"group",
"by",
"process_id"
] | Show all process ids and the number of documents in each process. | [
"Show",
"all",
"process",
"ids",
"and",
"the",
"number",
"of",
"documents",
"in",
"each",
"process",
"."
] | CREATE TABLE Staff (
staff_id NUMBER PRIMARY KEY,
staff_details TEXT
);
CREATE TABLE Ref_Staff_Roles (
staff_role_code TEXT PRIMARY KEY,
staff_role_description TEXT
);
CREATE TABLE Process_Outcomes (
process_outcome_code TEXT PRIMARY KEY,
process_outcome_description TEXT
);
CREATE TABLE Process_Status (
p... |
cre_Doc_and_collections | SELECT T2.Document_Object_ID , count(*) 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 ORDER BY count(*) DESC LIMIT 1; | [
"SELECT",
"T2.Document_Object_ID",
",",
"count",
"(",
"*",
")",
"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",
"ORDER",
"BY",
"... | [
"select",
"t2",
".",
"document_object_id",
",",
"count",
"(",
"*",
")",
"from",
"document_objects",
"as",
"t1",
"join",
"document_objects",
"as",
"t2",
"on",
"t1",
".",
"parent_document_object_id",
"=",
"t2",
".",
"document_object_id",
"group",
"by",
"t2",
"."... | For each document object id, how many children do they have? | [
"For",
"each",
"document",
"object",
"id",
",",
"how",
"many",
"children",
"do",
"they",
"have",
"?"
] | CREATE TABLE Document_Subsets (
Document_Subset_ID NUMBER PRIMARY KEY,
Document_Subset_Name TEXT,
Document_Subset_Details TEXT
);
CREATE TABLE Collection_Subsets (
Collection_Subset_ID NUMBER PRIMARY KEY,
Collection_Subset_Name TEXT,
Collecrtion_Subset_Details TEXT
);
CREATE TABLE Document_Objects (
Docum... |
book_1 | SELECT name , address FROM Client ORDER BY name | [
"SELECT",
"name",
",",
"address",
"FROM",
"Client",
"ORDER",
"BY",
"name"
] | [
"select",
"name",
",",
"address",
"from",
"client",
"order",
"by",
"name"
] | List names and addresses of all clients in alphabetical order by their names. | [
"List",
"names",
"and",
"addresses",
"of",
"all",
"clients",
"in",
"alphabetical",
"order",
"by",
"their",
"names",
"."
] | CREATE TABLE Client (
IdClient TEXT PRIMARY KEY,
Name TEXT,
Address TEXT,
NumCC TEXT
);
CREATE TABLE Orders (
IdOrder TEXT PRIMARY KEY,
IdClient TEXT,
DateOrder TIME,
DateExped TIME
);
CREATE TABLE Author (
idAuthor NUMBER PRIMARY KEY,
Name TEXT
);
CREATE TABLE Book (
ISBN TEXT PRIMARY KEY,
Titl... |
real_estate_rentals | SELECT T1.first_name FROM Users AS T1 JOIN Properties AS T2 ON T2.owner_user_id = T1.User_id GROUP BY T1.User_id ORDER BY count(*) DESC LIMIT 1; | [
"SELECT",
"T1.first_name",
"FROM",
"Users",
"AS",
"T1",
"JOIN",
"Properties",
"AS",
"T2",
"ON",
"T2.owner_user_id",
"=",
"T1.User_id",
"GROUP",
"BY",
"T1.User_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
] | [
"select",
"t1",
".",
"first_name",
"from",
"users",
"as",
"t1",
"join",
"properties",
"as",
"t2",
"on",
"t2",
".",
"owner_user_id",
"=",
"t1",
".",
"user_id",
"group",
"by",
"t1",
".",
"user_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
... | Return the first name of the user who owns the most properties. | [
"Return",
"the",
"first",
"name",
"of",
"the",
"user",
"who",
"owns",
"the",
"most",
"properties",
"."
] | CREATE TABLE Ref_Age_Categories (
age_category_code TEXT PRIMARY KEY,
age_category_description TEXT
);
CREATE TABLE Ref_Property_Types (
property_type_code TEXT PRIMARY KEY,
property_type_description TEXT
);
CREATE TABLE Ref_Room_Types (
room_type_code TEXT PRIMARY KEY,
room_type_description TEXT
);
CREATE ... |
video_game | SELECT Platform_name , Platform_ID FROM platform WHERE Download_rank = 1 | [
"SELECT",
"Platform_name",
",",
"Platform_ID",
"FROM",
"platform",
"WHERE",
"Download_rank",
"=",
"1"
] | [
"select",
"platform_name",
",",
"platform_id",
"from",
"platform",
"where",
"download_rank",
"=",
"value"
] | Return the names and ids of all platforms with the download rank of 1. | [
"Return",
"the",
"names",
"and",
"ids",
"of",
"all",
"platforms",
"with",
"the",
"download",
"rank",
"of",
"1",
"."
] | CREATE TABLE platform (
Platform_ID NUMBER PRIMARY KEY,
Platform_name TEXT,
Market_district TEXT,
Download_rank NUMBER
);
CREATE TABLE game (
Game_ID NUMBER PRIMARY KEY,
Title TEXT,
Release_Date TEXT,
Franchise TEXT,
Developers TEXT,
Platform_ID NUMBER,
Units_sold_Millions NUMBER,
FOREIGN KEY (P... |
customers_and_orders | SELECT product_name FROM Products WHERE product_type_code = "Hardware" AND product_price > (SELECT avg(product_price) FROM Products WHERE product_type_code = "Hardware") | [
"SELECT",
"product_name",
"FROM",
"Products",
"WHERE",
"product_type_code",
"=",
"``",
"Hardware",
"''",
"AND",
"product_price",
">",
"(",
"SELECT",
"avg",
"(",
"product_price",
")",
"FROM",
"Products",
"WHERE",
"product_type_code",
"=",
"``",
"Hardware",
"''",
... | [
"select",
"product_name",
"from",
"products",
"where",
"product_type_code",
"=",
"value",
"and",
"product_price",
">",
"(",
"select",
"avg",
"(",
"product_price",
")",
"from",
"products",
"where",
"product_type_code",
"=",
"value",
")"
] | What are the names of Hardware product with prices above the average price of Hardware products. | [
"What",
"are",
"the",
"names",
"of",
"Hardware",
"product",
"with",
"prices",
"above",
"the",
"average",
"price",
"of",
"Hardware",
"products",
"."
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
product_type_code TEXT,
product_name TEXT,
product_price NUMBER
);
CREATE TABLE Addresses (
address_id NUMBER PRIMARY KEY,
address_details TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
address_id NUMBER,
payment_method_code TEXT... |
soccer_3 | SELECT T1.Name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID GROUP BY T1.Club_ID ORDER BY avg(T2.Earnings) DESC | [
"SELECT",
"T1.Name",
"FROM",
"club",
"AS",
"T1",
"JOIN",
"player",
"AS",
"T2",
"ON",
"T1.Club_ID",
"=",
"T2.Club_ID",
"GROUP",
"BY",
"T1.Club_ID",
"ORDER",
"BY",
"avg",
"(",
"T2.Earnings",
")",
"DESC"
] | [
"select",
"t1",
".",
"name",
"from",
"club",
"as",
"t1",
"join",
"player",
"as",
"t2",
"on",
"t1",
".",
"club_id",
"=",
"t2",
".",
"club_id",
"group",
"by",
"t1",
".",
"club_id",
"order",
"by",
"avg",
"(",
"t2",
".",
"earnings",
")",
"desc"
] | What are the names of clubs, ordered descending by the average earnings of players within each? | [
"What",
"are",
"the",
"names",
"of",
"clubs",
",",
"ordered",
"descending",
"by",
"the",
"average",
"earnings",
"of",
"players",
"within",
"each",
"?"
] | CREATE TABLE club (
Club_ID NUMBER PRIMARY KEY,
Name TEXT,
Manager TEXT,
Captain TEXT,
Manufacturer TEXT,
Sponsor TEXT
);
CREATE TABLE player (
Player_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Earnings NUMBER,
Events_number NUMBER,
Wins_count NUMBER,
Club_ID NUMBER,
FOREIGN KEY (Club_I... |
book_1 | SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn = T2.isbn JOIN Author AS T3 ON T2.Author = T3.idAuthor WHERE T3.name = "Plato" AND T1.saleprice < (SELECT avg(saleprice) FROM Book) | [
"SELECT",
"T1.title",
"FROM",
"Book",
"AS",
"T1",
"JOIN",
"Author_book",
"AS",
"T2",
"ON",
"T1.isbn",
"=",
"T2.isbn",
"JOIN",
"Author",
"AS",
"T3",
"ON",
"T2.Author",
"=",
"T3.idAuthor",
"WHERE",
"T3.name",
"=",
"``",
"Plato",
"''",
"AND",
"T1.saleprice",
... | [
"select",
"t1",
".",
"title",
"from",
"book",
"as",
"t1",
"join",
"author_book",
"as",
"t2",
"on",
"t1",
".",
"isbn",
"=",
"t2",
".",
"isbn",
"join",
"author",
"as",
"t3",
"on",
"t2",
".",
"author",
"=",
"t3",
".",
"idauthor",
"where",
"t3",
".",
... | Give the titles of books authored by Plato that have a sale price lower than the average sale price across all books. | [
"Give",
"the",
"titles",
"of",
"books",
"authored",
"by",
"Plato",
"that",
"have",
"a",
"sale",
"price",
"lower",
"than",
"the",
"average",
"sale",
"price",
"across",
"all",
"books",
"."
] | CREATE TABLE Client (
IdClient TEXT PRIMARY KEY,
Name TEXT,
Address TEXT,
NumCC TEXT
);
CREATE TABLE Orders (
IdOrder TEXT PRIMARY KEY,
IdClient TEXT,
DateOrder TIME,
DateExped TIME
);
CREATE TABLE Author (
idAuthor NUMBER PRIMARY KEY,
Name TEXT
);
CREATE TABLE Book (
ISBN TEXT PRIMARY KEY,
Titl... |
vehicle_driver | 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",
"."
] | CREATE TABLE vehicle (
Vehicle_ID NUMBER PRIMARY KEY,
Model TEXT,
Build_Year TEXT,
Top_Speed NUMBER,
Power NUMBER,
Builder TEXT,
Total_Production TEXT
);
CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
Name TEXT,
Citizenship TEXT,
Racing_Series TEXT
);
CREATE TABLE vehicle_driver (
Driver_ID... |
book_press | 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",
... | [
"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",
... | Which authors have never published under the "Accor" press? Give me their names. | [
"Which",
"authors",
"have",
"never",
"published",
"under",
"the",
"``",
"Accor",
"''",
"press",
"?",
"Give",
"me",
"their",
"names",
"."
] | CREATE TABLE author (
Author_ID NUMBER PRIMARY KEY,
Name TEXT,
Age NUMBER,
Gender TEXT
);
CREATE TABLE press (
Press_ID NUMBER PRIMARY KEY,
Name TEXT,
Month_Profits_billion NUMBER,
Year_Profits_billion NUMBER
);
CREATE TABLE book (
Book_ID NUMBER PRIMARY KEY,
Title TEXT,
Book_Series TEXT,
Author... |
book_press | SELECT count(*) , gender FROM author WHERE age > 30 GROUP BY gender | [
"SELECT",
"count",
"(",
"*",
")",
",",
"gender",
"FROM",
"author",
"WHERE",
"age",
">",
"30",
"GROUP",
"BY",
"gender"
] | [
"select",
"count",
"(",
"*",
")",
",",
"gender",
"from",
"author",
"where",
"age",
">",
"value",
"group",
"by",
"gender"
] | find the number of authors who are older than 30 for each gender. | [
"find",
"the",
"number",
"of",
"authors",
"who",
"are",
"older",
"than",
"30",
"for",
"each",
"gender",
"."
] | CREATE TABLE author (
Author_ID NUMBER PRIMARY KEY,
Name TEXT,
Age NUMBER,
Gender TEXT
);
CREATE TABLE press (
Press_ID NUMBER PRIMARY KEY,
Name TEXT,
Month_Profits_billion NUMBER,
Year_Profits_billion NUMBER
);
CREATE TABLE book (
Book_ID NUMBER PRIMARY KEY,
Title TEXT,
Book_Series TEXT,
Author... |
headphone_store | SELECT earpads FROM headphone GROUP BY earpads ORDER BY count(*) DESC LIMIT 2 | [
"SELECT",
"earpads",
"FROM",
"headphone",
"GROUP",
"BY",
"earpads",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"2"
] | [
"select",
"earpads",
"from",
"headphone",
"group",
"by",
"earpads",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | What are the top 2 earpads in terms of the number of headphones using them? | [
"What",
"are",
"the",
"top",
"2",
"earpads",
"in",
"terms",
"of",
"the",
"number",
"of",
"headphones",
"using",
"them",
"?"
] | CREATE TABLE headphone (
Headphone_ID NUMBER PRIMARY KEY,
Model TEXT,
Class TEXT,
Driver-matched_dB NUMBER,
Construction TEXT,
Earpads TEXT,
Price NUMBER
);
CREATE TABLE store (
Store_ID NUMBER PRIMARY KEY,
Name TEXT,
Neighborhood TEXT,
Parking TEXT,
Date_Opened TEXT
);
CREATE TABLE stock (
St... |
government_shift | SELECT analytical_layer_type_code , count(*) FROM analytical_layer GROUP BY analytical_layer_type_code | [
"SELECT",
"analytical_layer_type_code",
",",
"count",
"(",
"*",
")",
"FROM",
"analytical_layer",
"GROUP",
"BY",
"analytical_layer_type_code"
] | [
"select",
"analytical_layer_type_code",
",",
"count",
"(",
"*",
")",
"from",
"analytical_layer",
"group",
"by",
"analytical_layer_type_code"
] | Find all the layer type codes with their corresponding usage count. | [
"Find",
"all",
"the",
"layer",
"type",
"codes",
"with",
"their",
"corresponding",
"usage",
"count",
"."
] | CREATE TABLE Services (
Service_ID NUMBER PRIMARY KEY,
Service_Details TEXT
);
CREATE TABLE Customers (
Customer_ID NUMBER PRIMARY KEY,
Customer_Details TEXT
);
CREATE TABLE Channels (
Channel_ID NUMBER PRIMARY KEY,
Channel_Details TEXT
);
CREATE TABLE Customers_and_Services (
Customers_and_Services_ID NU... |
customers_and_orders | SELECT count(*) FROM Customers | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Customers"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"customers"
] | How many customers do we have? | [
"How",
"many",
"customers",
"do",
"we",
"have",
"?"
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
product_type_code TEXT,
product_name TEXT,
product_price NUMBER
);
CREATE TABLE Addresses (
address_id NUMBER PRIMARY KEY,
address_details TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
address_id NUMBER,
payment_method_code TEXT... |
real_estate_rentals | SELECT search_datetime , search_string FROM User_Searches ORDER BY search_string DESC; | [
"SELECT",
"search_datetime",
",",
"search_string",
"FROM",
"User_Searches",
"ORDER",
"BY",
"search_string",
"DESC",
";"
] | [
"select",
"search_datetime",
",",
"search_string",
"from",
"user_searches",
"order",
"by",
"search_string",
"desc"
] | Return the search strings and corresonding time stamps for all user searches, sorted by search string descending. | [
"Return",
"the",
"search",
"strings",
"and",
"corresonding",
"time",
"stamps",
"for",
"all",
"user",
"searches",
",",
"sorted",
"by",
"search",
"string",
"descending",
"."
] | CREATE TABLE Ref_Age_Categories (
age_category_code TEXT PRIMARY KEY,
age_category_description TEXT
);
CREATE TABLE Ref_Property_Types (
property_type_code TEXT PRIMARY KEY,
property_type_description TEXT
);
CREATE TABLE Ref_Room_Types (
room_type_code TEXT PRIMARY KEY,
room_type_description TEXT
);
CREATE ... |
e_commerce | SELECT DISTINCT T1.product_name , T1.product_price , T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T2.order_id = T3.order_id JOIN Customers AS T4 ON T3.customer_id = T4.customer_id WHERE T4.gender_code = 'Female' | [
"SELECT",
"DISTINCT",
"T1.product_name",
",",
"T1.product_price",
",",
"T1.product_description",
"FROM",
"Products",
"AS",
"T1",
"JOIN",
"Order_items",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"JOIN",
"Orders",
"AS",
"T3",
"ON",
"T2.order_id",
"=",
... | [
"select",
"distinct",
"t1",
".",
"product_name",
",",
"t1",
".",
"product_price",
",",
"t1",
".",
"product_description",
"from",
"products",
"as",
"t1",
"join",
"order_items",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"join",
... | List all the distinct product names, price and descriptions which are bought by female customers. | [
"List",
"all",
"the",
"distinct",
"product",
"names",
",",
"price",
"and",
"descriptions",
"which",
"are",
"bought",
"by",
"female",
"customers",
"."
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
parent_product_id NUMBER,
product_name TEXT,
product_price NUMBER,
product_color TEXT,
product_size TEXT,
product_description TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
gender_code TEXT,
customer_first_name TEXT,
customer... |
customers_and_orders | SELECT order_status_code , count(*) FROM Customer_orders GROUP BY order_status_code | [
"SELECT",
"order_status_code",
",",
"count",
"(",
"*",
")",
"FROM",
"Customer_orders",
"GROUP",
"BY",
"order_status_code"
] | [
"select",
"order_status_code",
",",
"count",
"(",
"*",
")",
"from",
"customer_orders",
"group",
"by",
"order_status_code"
] | How many orders have each order status code? | [
"How",
"many",
"orders",
"have",
"each",
"order",
"status",
"code",
"?"
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
product_type_code TEXT,
product_name TEXT,
product_price NUMBER
);
CREATE TABLE Addresses (
address_id NUMBER PRIMARY KEY,
address_details TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
address_id NUMBER,
payment_method_code TEXT... |
headphone_store | 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",
")"
] | Find the name of stores which have no headphone in stock. | [
"Find",
"the",
"name",
"of",
"stores",
"which",
"have",
"no",
"headphone",
"in",
"stock",
"."
] | CREATE TABLE headphone (
Headphone_ID NUMBER PRIMARY KEY,
Model TEXT,
Class TEXT,
Driver-matched_dB NUMBER,
Construction TEXT,
Earpads TEXT,
Price NUMBER
);
CREATE TABLE store (
Store_ID NUMBER PRIMARY KEY,
Name TEXT,
Neighborhood TEXT,
Parking TEXT,
Date_Opened TEXT
);
CREATE TABLE stock (
St... |
car_racing | SELECT max(Points) , min(Points) FROM driver | [
"SELECT",
"max",
"(",
"Points",
")",
",",
"min",
"(",
"Points",
")",
"FROM",
"driver"
] | [
"select",
"max",
"(",
"points",
")",
",",
"min",
"(",
"points",
")",
"from",
"driver"
] | Find the highest and lowest points of drivers. | [
"Find",
"the",
"highest",
"and",
"lowest",
"points",
"of",
"drivers",
"."
] | CREATE TABLE country (
Country_Id NUMBER PRIMARY KEY,
Country TEXT,
Capital TEXT,
Official_native_language TEXT,
Regoin TEXT
);
CREATE TABLE team (
Team_ID NUMBER PRIMARY KEY,
Team TEXT,
Make TEXT,
Manager TEXT,
Sponsor TEXT,
Car_Owner TEXT
);
CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
... |
art_1 | SELECT title , LOCATION FROM sculptures | [
"SELECT",
"title",
",",
"LOCATION",
"FROM",
"sculptures"
] | [
"select",
"title",
",",
"location",
"from",
"sculptures"
] | What are the sculptures called and where are they located? | [
"What",
"are",
"the",
"sculptures",
"called",
"and",
"where",
"are",
"they",
"located",
"?"
] | CREATE TABLE Artists (
artistID NUMBER PRIMARY KEY,
lname TEXT,
fname TEXT,
birthYear NUMBER,
deathYear NUMBER
);
CREATE TABLE Paintings (
paintingID NUMBER PRIMARY KEY,
title TEXT,
year NUMBER,
height_mm NUMBER,
width_mm NUMBER,
medium TEXT,
mediumOn TEXT,
location TEXT,
painterID NUMBER,
... |
pilot_1 | SELECT LOCATION FROM hangar ORDER BY plane_name | [
"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",
"."
] | CREATE TABLE PilotSkills (
pilot_name TEXT PRIMARY KEY,
plane_name TEXT,
age NUMBER,
FOREIGN KEY (plane_name) REFERENCES Hangar(plane_name)
);
CREATE TABLE Hangar (
plane_name TEXT PRIMARY KEY,
location TEXT
); |
vehicle_driver | SELECT T1.name , T1.citizenship 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.model = 'DJ1' | [
"SELECT",
"T1.name",
",",
"T1.citizenship",
"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.model",
"=",
"'DJ1... | [
"select",
"t1",
".",
"name",
",",
"t1",
".",
"citizenship",
"from",
"driver",
"as",
"t1",
"join",
"vehicle_driver",
"as",
"t2",
"on",
"t1",
".",
"driver_id",
"=",
"t2",
".",
"driver_id",
"join",
"vehicle",
"as",
"t3",
"on",
"t2",
".",
"vehicle_id",
"="... | What are the name and citizenship of the drivers who have driven the vehicle model 'DJ1'? | [
"What",
"are",
"the",
"name",
"and",
"citizenship",
"of",
"the",
"drivers",
"who",
"have",
"driven",
"the",
"vehicle",
"model",
"'DJ1",
"'",
"?"
] | CREATE TABLE vehicle (
Vehicle_ID NUMBER PRIMARY KEY,
Model TEXT,
Build_Year TEXT,
Top_Speed NUMBER,
Power NUMBER,
Builder TEXT,
Total_Production TEXT
);
CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
Name TEXT,
Citizenship TEXT,
Racing_Series TEXT
);
CREATE TABLE vehicle_driver (
Driver_ID... |
conference | SELECT DISTINCT conference_name FROM conference | [
"SELECT",
"DISTINCT",
"conference_name",
"FROM",
"conference"
] | [
"select",
"distinct",
"conference_name",
"from",
"conference"
] | What are the different conference names? | [
"What",
"are",
"the",
"different",
"conference",
"names",
"?"
] | CREATE TABLE conference (
Conference_ID NUMBER PRIMARY KEY,
Conference_Name TEXT,
Year NUMBER,
Location TEXT
);
CREATE TABLE institution (
Institution_ID NUMBER PRIMARY KEY,
Institution_Name TEXT,
Location TEXT,
Founded NUMBER
);
CREATE TABLE staff (
staff_ID NUMBER PRIMARY KEY,
name TEXT,
Age NUM... |
region_building | 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"
] | Please show each completion year and the number of buildings completed in that year. | [
"Please",
"show",
"each",
"completion",
"year",
"and",
"the",
"number",
"of",
"buildings",
"completed",
"in",
"that",
"year",
"."
] | CREATE TABLE building (
Building_ID NUMBER PRIMARY KEY,
Region_ID NUMBER,
Name TEXT,
Address TEXT,
Number_of_Stories NUMBER,
Completed_Year NUMBER,
FOREIGN KEY (Region_ID) REFERENCES region(Region_ID)
);
CREATE TABLE region (
Region_ID NUMBER PRIMARY KEY,
Name TEXT,
Capital TEXT,
Area NUMBER,
Po... |
bakery_1 | SELECT DISTINCT T4.FirstName , T4.LastName FROM goods AS T1 JOIN items AS T2 ON T1.id = T2.item JOIN receipts AS T3 ON T2.receipt = T3.ReceiptNumber JOIN customers AS T4 ON T3.CustomerId = T4.id WHERE T1.flavor = "Apple" AND T1.food = "Tart" | [
"SELECT",
"DISTINCT",
"T4.FirstName",
",",
"T4.LastName",
"FROM",
"goods",
"AS",
"T1",
"JOIN",
"items",
"AS",
"T2",
"ON",
"T1.id",
"=",
"T2.item",
"JOIN",
"receipts",
"AS",
"T3",
"ON",
"T2.receipt",
"=",
"T3.ReceiptNumber",
"JOIN",
"customers",
"AS",
"T4",
"... | [
"select",
"distinct",
"t4",
".",
"firstname",
",",
"t4",
".",
"lastname",
"from",
"goods",
"as",
"t1",
"join",
"items",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"item",
"join",
"receipts",
"as",
"t3",
"on",
"t2",
".",
"receipt",
"=",
"t3"... | What are the full names of customers who bought apple flavored Tarts? | [
"What",
"are",
"the",
"full",
"names",
"of",
"customers",
"who",
"bought",
"apple",
"flavored",
"Tarts",
"?"
] | CREATE TABLE customers (
Id NUMBER PRIMARY KEY,
LastName TEXT,
FirstName TEXT
);
CREATE TABLE goods (
Id TEXT PRIMARY KEY,
Flavor TEXT,
Food TEXT,
Price NUMBER
);
CREATE TABLE items (
Receipt NUMBER PRIMARY KEY,
Ordinal NUMBER,
Item TEXT,
FOREIGN KEY (Item) REFERENCES goods(Id)
);
CREATE TABLE rec... |
region_building | SELECT count(*) FROM building | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"building"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"building"
] | Count the number of buildings. | [
"Count",
"the",
"number",
"of",
"buildings",
"."
] | CREATE TABLE building (
Building_ID NUMBER PRIMARY KEY,
Region_ID NUMBER,
Name TEXT,
Address TEXT,
Number_of_Stories NUMBER,
Completed_Year NUMBER,
FOREIGN KEY (Region_ID) REFERENCES region(Region_ID)
);
CREATE TABLE region (
Region_ID NUMBER PRIMARY KEY,
Name TEXT,
Capital TEXT,
Area NUMBER,
Po... |
bakery_1 | 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"... | [
"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",
"wher... | List the distinct ids of all customers who bought a cake with lemon flavor? | [
"List",
"the",
"distinct",
"ids",
"of",
"all",
"customers",
"who",
"bought",
"a",
"cake",
"with",
"lemon",
"flavor",
"?"
] | CREATE TABLE customers (
Id NUMBER PRIMARY KEY,
LastName TEXT,
FirstName TEXT
);
CREATE TABLE goods (
Id TEXT PRIMARY KEY,
Flavor TEXT,
Food TEXT,
Price NUMBER
);
CREATE TABLE items (
Receipt NUMBER PRIMARY KEY,
Ordinal NUMBER,
Item TEXT,
FOREIGN KEY (Item) REFERENCES goods(Id)
);
CREATE TABLE rec... |
soccer_3 | SELECT Name FROM player ORDER BY Earnings DESC LIMIT 1 | [
"SELECT",
"Name",
"FROM",
"player",
"ORDER",
"BY",
"Earnings",
"DESC",
"LIMIT",
"1"
] | [
"select",
"name",
"from",
"player",
"order",
"by",
"earnings",
"desc",
"limit",
"value"
] | What is the name of the player with the highest earnings? | [
"What",
"is",
"the",
"name",
"of",
"the",
"player",
"with",
"the",
"highest",
"earnings",
"?"
] | CREATE TABLE club (
Club_ID NUMBER PRIMARY KEY,
Name TEXT,
Manager TEXT,
Captain TEXT,
Manufacturer TEXT,
Sponsor TEXT
);
CREATE TABLE player (
Player_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Earnings NUMBER,
Events_number NUMBER,
Wins_count NUMBER,
Club_ID NUMBER,
FOREIGN KEY (Club_I... |
real_estate_rentals | SELECT T2.town_city FROM Properties AS T1 JOIN Addresses AS T2 ON T1.property_address_id = T2.address_id JOIN Property_Features AS T3 ON T1.property_id = T3.property_id JOIN Features AS T4 ON T4.feature_id = T3.feature_id WHERE T4.feature_name = 'swimming pool'; | [
"SELECT",
"T2.town_city",
"FROM",
"Properties",
"AS",
"T1",
"JOIN",
"Addresses",
"AS",
"T2",
"ON",
"T1.property_address_id",
"=",
"T2.address_id",
"JOIN",
"Property_Features",
"AS",
"T3",
"ON",
"T1.property_id",
"=",
"T3.property_id",
"JOIN",
"Features",
"AS",
"T4",... | [
"select",
"t2",
".",
"town_city",
"from",
"properties",
"as",
"t1",
"join",
"addresses",
"as",
"t2",
"on",
"t1",
".",
"property_address_id",
"=",
"t2",
".",
"address_id",
"join",
"property_features",
"as",
"t3",
"on",
"t1",
".",
"property_id",
"=",
"t3",
"... | Return the cities in which there exist properties that have swimming pools. | [
"Return",
"the",
"cities",
"in",
"which",
"there",
"exist",
"properties",
"that",
"have",
"swimming",
"pools",
"."
] | CREATE TABLE Ref_Age_Categories (
age_category_code TEXT PRIMARY KEY,
age_category_description TEXT
);
CREATE TABLE Ref_Property_Types (
property_type_code TEXT PRIMARY KEY,
property_type_description TEXT
);
CREATE TABLE Ref_Room_Types (
room_type_code TEXT PRIMARY KEY,
room_type_description TEXT
);
CREATE ... |
soccer_3 | SELECT Country FROM player WHERE Earnings > 1400000 INTERSECT SELECT Country FROM player WHERE Earnings < 1100000 | [
"SELECT",
"Country",
"FROM",
"player",
"WHERE",
"Earnings",
">",
"1400000",
"INTERSECT",
"SELECT",
"Country",
"FROM",
"player",
"WHERE",
"Earnings",
"<",
"1100000"
] | [
"select",
"country",
"from",
"player",
"where",
"earnings",
">",
"value",
"intersect",
"select",
"country",
"from",
"player",
"where",
"earnings",
"<",
"value"
] | Which country has produced both players with earnings over 1400000 and players with earnings below 1100000? | [
"Which",
"country",
"has",
"produced",
"both",
"players",
"with",
"earnings",
"over",
"1400000",
"and",
"players",
"with",
"earnings",
"below",
"1100000",
"?"
] | CREATE TABLE club (
Club_ID NUMBER PRIMARY KEY,
Name TEXT,
Manager TEXT,
Captain TEXT,
Manufacturer TEXT,
Sponsor TEXT
);
CREATE TABLE player (
Player_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Earnings NUMBER,
Events_number NUMBER,
Wins_count NUMBER,
Club_ID NUMBER,
FOREIGN KEY (Club_I... |
advertising_agencies | SELECT meeting_id , count(*) FROM Staff_in_meetings GROUP BY meeting_id | [
"SELECT",
"meeting_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Staff_in_meetings",
"GROUP",
"BY",
"meeting_id"
] | [
"select",
"meeting_id",
",",
"count",
"(",
"*",
")",
"from",
"staff_in_meetings",
"group",
"by",
"meeting_id"
] | Count the number of staff in each meeting by meeting id. | [
"Count",
"the",
"number",
"of",
"staff",
"in",
"each",
"meeting",
"by",
"meeting",
"id",
"."
] | CREATE TABLE Agencies (
agency_id NUMBER PRIMARY KEY,
agency_details TEXT
);
CREATE TABLE Staff (
staff_id NUMBER PRIMARY KEY,
agency_id NUMBER,
staff_details TEXT
);
CREATE TABLE Clients (
client_id NUMBER PRIMARY KEY,
agency_id NUMBER,
sic_code TEXT,
client_details TEXT,
FOREIGN KEY (agency_id) RE... |
institution_sports | 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"
] | Return all the enrollments of institutions in either the city of Vancouver or the city of Calgary . | [
"Return",
"all",
"the",
"enrollments",
"of",
"institutions",
"in",
"either",
"the",
"city",
"of",
"Vancouver",
"or",
"the",
"city",
"of",
"Calgary",
"."
] | CREATE TABLE institution (
Institution_ID NUMBER PRIMARY KEY,
Name TEXT,
Team TEXT,
City TEXT,
Province TEXT,
Founded NUMBER,
Affiliation TEXT,
Enrollment NUMBER,
Endowment TEXT,
Stadium TEXT,
Capacity NUMBER
);
CREATE TABLE Championship (
Institution_ID NUMBER PRIMARY KEY,
Nickname TEXT,
Jo... |
car_road_race | SELECT max(Age) , min(Age) FROM driver | [
"SELECT",
"max",
"(",
"Age",
")",
",",
"min",
"(",
"Age",
")",
"FROM",
"driver"
] | [
"select",
"max",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
"from",
"driver"
] | What are the maximum and minimum age of driver? | [
"What",
"are",
"the",
"maximum",
"and",
"minimum",
"age",
"of",
"driver",
"?"
] | CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
Driver_Name TEXT,
Entrant TEXT,
Constructor TEXT,
Chassis TEXT,
Engine TEXT,
Age NUMBER
);
CREATE TABLE race (
Road NUMBER PRIMARY KEY,
Driver_ID NUMBER,
Race_Name TEXT,
Pole_Position TEXT,
Fastest_Lap TEXT,
Winning_driver TEXT,
Winning_tea... |
country_language | 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",
")"
] | What are the names of languages that are not the official language of any country? | [
"What",
"are",
"the",
"names",
"of",
"languages",
"that",
"are",
"not",
"the",
"official",
"language",
"of",
"any",
"country",
"?"
] | CREATE TABLE languages (
id NUMBER PRIMARY KEY,
name TEXT
);
CREATE TABLE countries (
id NUMBER PRIMARY KEY,
name TEXT,
overall_score NUMBER,
justice_score NUMBER,
health_score NUMBER,
education_score NUMBER,
economics_score NUMBER,
politics_score NUMBER
);
CREATE TABLE official_languages (
langua... |
institution_sports | SELECT Province FROM institution WHERE Founded < 1920 INTERSECT SELECT Province FROM institution WHERE Founded > 1950 | [
"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",
"."
] | CREATE TABLE institution (
Institution_ID NUMBER PRIMARY KEY,
Name TEXT,
Team TEXT,
City TEXT,
Province TEXT,
Founded NUMBER,
Affiliation TEXT,
Enrollment NUMBER,
Endowment TEXT,
Stadium TEXT,
Capacity NUMBER
);
CREATE TABLE Championship (
Institution_ID NUMBER PRIMARY KEY,
Nickname TEXT,
Jo... |
e_commerce | SELECT avg(T1.product_price) FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id | [
"SELECT",
"avg",
"(",
"T1.product_price",
")",
"FROM",
"Products",
"AS",
"T1",
"JOIN",
"Order_items",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id"
] | [
"select",
"avg",
"(",
"t1",
".",
"product_price",
")",
"from",
"products",
"as",
"t1",
"join",
"order_items",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id"
] | What is the average price of the products being ordered? | [
"What",
"is",
"the",
"average",
"price",
"of",
"the",
"products",
"being",
"ordered",
"?"
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
parent_product_id NUMBER,
product_name TEXT,
product_price NUMBER,
product_color TEXT,
product_size TEXT,
product_description TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
gender_code TEXT,
customer_first_name TEXT,
customer... |
car_racing | SELECT count(*) FROM driver WHERE Points < 150 | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"driver",
"WHERE",
"Points",
"<",
"150"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"driver",
"where",
"points",
"<",
"value"
] | Count the number of drivers whose points are below 150. | [
"Count",
"the",
"number",
"of",
"drivers",
"whose",
"points",
"are",
"below",
"150",
"."
] | CREATE TABLE country (
Country_Id NUMBER PRIMARY KEY,
Country TEXT,
Capital TEXT,
Official_native_language TEXT,
Regoin TEXT
);
CREATE TABLE team (
Team_ID NUMBER PRIMARY KEY,
Team TEXT,
Make TEXT,
Manager TEXT,
Sponsor TEXT,
Car_Owner TEXT
);
CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
... |
planet_1 | SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID WHERE T2.Name = "Mars"; | [
"SELECT",
"T1.ShipmentID",
"FROM",
"Shipment",
"AS",
"T1",
"JOIN",
"Planet",
"AS",
"T2",
"ON",
"T1.Planet",
"=",
"T2.PlanetID",
"WHERE",
"T2.Name",
"=",
"``",
"Mars",
"''",
";"
] | [
"select",
"t1",
".",
"shipmentid",
"from",
"shipment",
"as",
"t1",
"join",
"planet",
"as",
"t2",
"on",
"t1",
".",
"planet",
"=",
"t2",
".",
"planetid",
"where",
"t2",
".",
"name",
"=",
"value"
] | What are the shipment ids for the planet Mars? | [
"What",
"are",
"the",
"shipment",
"ids",
"for",
"the",
"planet",
"Mars",
"?"
] | CREATE TABLE Employee (
EmployeeID NUMBER PRIMARY KEY,
Name TEXT,
Position TEXT,
Salary NUMBER,
Remarks TEXT
);
CREATE TABLE Planet (
PlanetID NUMBER PRIMARY KEY,
Name TEXT,
Coordinates NUMBER
);
CREATE TABLE Shipment (
ShipmentID NUMBER PRIMARY KEY,
Date TIME,
Manager NUMBER,
Planet NUMBER,
F... |
planet_1 | SELECT PackageNumber , Weight FROM PACKAGE ORDER BY Weight ASC LIMIT 3; | [
"SELECT",
"PackageNumber",
",",
"Weight",
"FROM",
"PACKAGE",
"ORDER",
"BY",
"Weight",
"ASC",
"LIMIT",
"3",
";"
] | [
"select",
"packagenumber",
",",
"weight",
"from",
"package",
"order",
"by",
"weight",
"asc",
"limit",
"value"
] | List package number and weight of top 3 lightest packages. | [
"List",
"package",
"number",
"and",
"weight",
"of",
"top",
"3",
"lightest",
"packages",
"."
] | CREATE TABLE Employee (
EmployeeID NUMBER PRIMARY KEY,
Name TEXT,
Position TEXT,
Salary NUMBER,
Remarks TEXT
);
CREATE TABLE Planet (
PlanetID NUMBER PRIMARY KEY,
Name TEXT,
Coordinates NUMBER
);
CREATE TABLE Shipment (
ShipmentID NUMBER PRIMARY KEY,
Date TIME,
Manager NUMBER,
Planet NUMBER,
F... |
cre_Students_Information_Systems | SELECT T1.bio_data , T1.student_id FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) >= 2 UNION SELECT T1.bio_data , T1.student_id FROM Students AS T1 JOIN Detention AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) < 2 | [
"SELECT",
"T1.bio_data",
",",
"T1.student_id",
"FROM",
"Students",
"AS",
"T1",
"JOIN",
"Classes",
"AS",
"T2",
"ON",
"T1.student_id",
"=",
"T2.student_id",
"GROUP",
"BY",
"T1.student_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2",
"UNION",
"SELECT",
"T1... | [
"select",
"t1",
".",
"bio_data",
",",
"t1",
".",
"student_id",
"from",
"students",
"as",
"t1",
"join",
"classes",
"as",
"t2",
"on",
"t1",
".",
"student_id",
"=",
"t2",
".",
"student_id",
"group",
"by",
"t1",
".",
"student_id",
"having",
"count",
"(",
"... | What are the biographical data and student id of the students who either took two or more classes and or have less than two detentions? | [
"What",
"are",
"the",
"biographical",
"data",
"and",
"student",
"id",
"of",
"the",
"students",
"who",
"either",
"took",
"two",
"or",
"more",
"classes",
"and",
"or",
"have",
"less",
"than",
"two",
"detentions",
"?"
] | CREATE TABLE Students (
student_id NUMBER PRIMARY KEY,
bio_data TEXT,
student_details TEXT
);
CREATE TABLE Transcripts (
transcript_id NUMBER PRIMARY KEY,
student_id NUMBER,
date_of_transcript TIME,
transcript_details TEXT,
FOREIGN KEY (student_id) REFERENCES Students(student_id)
);
CREATE TABLE Behavio... |
bbc_channels | SELECT count(DISTINCT Digital_terrestrial_channel) FROM channel | [
"SELECT",
"count",
"(",
"DISTINCT",
"Digital_terrestrial_channel",
")",
"FROM",
"channel"
] | [
"select",
"count",
"(",
"distinct",
"digital_terrestrial_channel",
")",
"from",
"channel"
] | How many different digital terrestrial channels are there? | [
"How",
"many",
"different",
"digital",
"terrestrial",
"channels",
"are",
"there",
"?"
] | CREATE TABLE channel (
Channel_ID NUMBER PRIMARY KEY,
Name TEXT,
Analogue_terrestrial_channel TEXT,
Digital_terrestrial_channel TEXT,
Internet TEXT
);
CREATE TABLE director (
Director_ID NUMBER PRIMARY KEY,
Name TEXT,
Age NUMBER
);
CREATE TABLE program (
Program_ID NUMBER PRIMARY KEY,
Start_Year NUM... |
cre_Doc_and_collections | 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' | [
"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",
"'"
] | [
"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",
"=",
"value"
] | 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",
"?"
] | CREATE TABLE Document_Subsets (
Document_Subset_ID NUMBER PRIMARY KEY,
Document_Subset_Name TEXT,
Document_Subset_Details TEXT
);
CREATE TABLE Collection_Subsets (
Collection_Subset_ID NUMBER PRIMARY KEY,
Collection_Subset_Name TEXT,
Collecrtion_Subset_Details TEXT
);
CREATE TABLE Document_Objects (
Docum... |
planet_1 | SELECT Name , Coordinates FROM Planet ORDER BY Name | [
"SELECT",
"Name",
",",
"Coordinates",
"FROM",
"Planet",
"ORDER",
"BY",
"Name"
] | [
"select",
"name",
",",
"coordinates",
"from",
"planet",
"order",
"by",
"name"
] | What are the names and coordinates of all planets in alphabetical order by name? | [
"What",
"are",
"the",
"names",
"and",
"coordinates",
"of",
"all",
"planets",
"in",
"alphabetical",
"order",
"by",
"name",
"?"
] | CREATE TABLE Employee (
EmployeeID NUMBER PRIMARY KEY,
Name TEXT,
Position TEXT,
Salary NUMBER,
Remarks TEXT
);
CREATE TABLE Planet (
PlanetID NUMBER PRIMARY KEY,
Name TEXT,
Coordinates NUMBER
);
CREATE TABLE Shipment (
ShipmentID NUMBER PRIMARY KEY,
Date TIME,
Manager NUMBER,
Planet NUMBER,
F... |
bike_racing | SELECT T3.product_name , T3.price 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.name = 'Bradley Wiggins' INTERSECT SELECT T3.product_name , T3.price FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id = T2.cyclist_id JOIN bike AS... | [
"SELECT",
"T3.product_name",
",",
"T3.price",
"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.name",
"=",
"'Bradley",
"Wigg... | [
"select",
"t3",
".",
"product_name",
",",
"t3",
".",
"price",
"from",
"cyclist",
"as",
"t1",
"join",
"cyclists_own_bikes",
"as",
"t2",
"on",
"t1",
".",
"id",
"=",
"t2",
".",
"cyclist_id",
"join",
"bike",
"as",
"t3",
"on",
"t2",
".",
"bike_id",
"=",
"... | List the name and price of the bike that is owned by both the cyclists named 'Bradley Wiggins' and the cyclist named 'Antonio Tauler'. | [
"List",
"the",
"name",
"and",
"price",
"of",
"the",
"bike",
"that",
"is",
"owned",
"by",
"both",
"the",
"cyclists",
"named",
"'Bradley",
"Wiggins",
"'",
"and",
"the",
"cyclist",
"named",
"'Antonio",
"Tauler",
"'",
"."
] | CREATE TABLE bike (
id NUMBER PRIMARY KEY,
product_name TEXT,
weight NUMBER,
price NUMBER,
material TEXT
);
CREATE TABLE cyclist (
id NUMBER PRIMARY KEY,
heat NUMBER,
name TEXT,
nation TEXT,
result NUMBER
);
CREATE TABLE cyclists_own_bikes (
cyclist_id NUMBER PRIMARY KEY,
bike_id NUMBER,
purch... |
video_game | SELECT Title , Developers FROM game ORDER BY Units_sold_Millions DESC | [
"SELECT",
"Title",
",",
"Developers",
"FROM",
"game",
"ORDER",
"BY",
"Units_sold_Millions",
"DESC"
] | [
"select",
"title",
",",
"developers",
"from",
"game",
"order",
"by",
"units_sold_millions",
"desc"
] | List the Title and Developers of all games ordered by units sold from large to small. | [
"List",
"the",
"Title",
"and",
"Developers",
"of",
"all",
"games",
"ordered",
"by",
"units",
"sold",
"from",
"large",
"to",
"small",
"."
] | CREATE TABLE platform (
Platform_ID NUMBER PRIMARY KEY,
Platform_name TEXT,
Market_district TEXT,
Download_rank NUMBER
);
CREATE TABLE game (
Game_ID NUMBER PRIMARY KEY,
Title TEXT,
Release_Date TEXT,
Franchise TEXT,
Developers TEXT,
Platform_ID NUMBER,
Units_sold_Millions NUMBER,
FOREIGN KEY (P... |
cre_Doc_and_collections | SELECT Collection_Description FROM Collections WHERE Collection_Name = "Best"; | [
"SELECT",
"Collection_Description",
"FROM",
"Collections",
"WHERE",
"Collection_Name",
"=",
"``",
"Best",
"''",
";"
] | [
"select",
"collection_description",
"from",
"collections",
"where",
"collection_name",
"=",
"value"
] | What is the description of collection named Best? | [
"What",
"is",
"the",
"description",
"of",
"collection",
"named",
"Best",
"?"
] | CREATE TABLE Document_Subsets (
Document_Subset_ID NUMBER PRIMARY KEY,
Document_Subset_Name TEXT,
Document_Subset_Details TEXT
);
CREATE TABLE Collection_Subsets (
Collection_Subset_ID NUMBER PRIMARY KEY,
Collection_Subset_Name TEXT,
Collecrtion_Subset_Details TEXT
);
CREATE TABLE Document_Objects (
Docum... |
advertising_agencies | 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",
"?"
] | CREATE TABLE Agencies (
agency_id NUMBER PRIMARY KEY,
agency_details TEXT
);
CREATE TABLE Staff (
staff_id NUMBER PRIMARY KEY,
agency_id NUMBER,
staff_details TEXT
);
CREATE TABLE Clients (
client_id NUMBER PRIMARY KEY,
agency_id NUMBER,
sic_code TEXT,
client_details TEXT,
FOREIGN KEY (agency_id) RE... |
e_commerce | SELECT customer_first_name , customer_middle_initial , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_middle_initial , T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id | [
"SELECT",
"customer_first_name",
",",
"customer_middle_initial",
",",
"customer_last_name",
"FROM",
"Customers",
"EXCEPT",
"SELECT",
"T1.customer_first_name",
",",
"T1.customer_middle_initial",
",",
"T1.customer_last_name",
"FROM",
"Customers",
"AS",
"T1",
"JOIN",
"Orders",
... | [
"select",
"customer_first_name",
",",
"customer_middle_initial",
",",
"customer_last_name",
"from",
"customers",
"except",
"select",
"t1",
".",
"customer_first_name",
",",
"t1",
".",
"customer_middle_initial",
",",
"t1",
".",
"customer_last_name",
"from",
"customers",
"... | Which customers did not make any orders? List the first name, middle initial and last name. | [
"Which",
"customers",
"did",
"not",
"make",
"any",
"orders",
"?",
"List",
"the",
"first",
"name",
",",
"middle",
"initial",
"and",
"last",
"name",
"."
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
parent_product_id NUMBER,
product_name TEXT,
product_price NUMBER,
product_color TEXT,
product_size TEXT,
product_description TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
gender_code TEXT,
customer_first_name TEXT,
customer... |
book_1 | SELECT title FROM book WHERE saleprice > (SELECT avg(saleprice) FROM book) | [
"SELECT",
"title",
"FROM",
"book",
"WHERE",
"saleprice",
">",
"(",
"SELECT",
"avg",
"(",
"saleprice",
")",
"FROM",
"book",
")"
] | [
"select",
"title",
"from",
"book",
"where",
"saleprice",
">",
"(",
"select",
"avg",
"(",
"saleprice",
")",
"from",
"book",
")"
] | What are the titles of books with sale prices above the average sale price across all books? | [
"What",
"are",
"the",
"titles",
"of",
"books",
"with",
"sale",
"prices",
"above",
"the",
"average",
"sale",
"price",
"across",
"all",
"books",
"?"
] | CREATE TABLE Client (
IdClient TEXT PRIMARY KEY,
Name TEXT,
Address TEXT,
NumCC TEXT
);
CREATE TABLE Orders (
IdOrder TEXT PRIMARY KEY,
IdClient TEXT,
DateOrder TIME,
DateExped TIME
);
CREATE TABLE Author (
idAuthor NUMBER PRIMARY KEY,
Name TEXT
);
CREATE TABLE Book (
ISBN TEXT PRIMARY KEY,
Titl... |
soccer_3 | SELECT Name FROM player ORDER BY Earnings DESC LIMIT 1 | [
"SELECT",
"Name",
"FROM",
"player",
"ORDER",
"BY",
"Earnings",
"DESC",
"LIMIT",
"1"
] | [
"select",
"name",
"from",
"player",
"order",
"by",
"earnings",
"desc",
"limit",
"value"
] | Return the name of the player who earns the most money. | [
"Return",
"the",
"name",
"of",
"the",
"player",
"who",
"earns",
"the",
"most",
"money",
"."
] | CREATE TABLE club (
Club_ID NUMBER PRIMARY KEY,
Name TEXT,
Manager TEXT,
Captain TEXT,
Manufacturer TEXT,
Sponsor TEXT
);
CREATE TABLE player (
Player_ID NUMBER PRIMARY KEY,
Name TEXT,
Country TEXT,
Earnings NUMBER,
Events_number NUMBER,
Wins_count NUMBER,
Club_ID NUMBER,
FOREIGN KEY (Club_I... |
car_racing | SELECT make , count(*) FROM driver WHERE points > 150 GROUP BY make | [
"SELECT",
"make",
",",
"count",
"(",
"*",
")",
"FROM",
"driver",
"WHERE",
"points",
">",
"150",
"GROUP",
"BY",
"make"
] | [
"select",
"make",
",",
"count",
"(",
"*",
")",
"from",
"driver",
"where",
"points",
">",
"value",
"group",
"by",
"make"
] | How many drivers receive points greater than 150 for each make? Show the make and the count. | [
"How",
"many",
"drivers",
"receive",
"points",
"greater",
"than",
"150",
"for",
"each",
"make",
"?",
"Show",
"the",
"make",
"and",
"the",
"count",
"."
] | CREATE TABLE country (
Country_Id NUMBER PRIMARY KEY,
Country TEXT,
Capital TEXT,
Official_native_language TEXT,
Regoin TEXT
);
CREATE TABLE team (
Team_ID NUMBER PRIMARY KEY,
Team TEXT,
Make TEXT,
Manager TEXT,
Sponsor TEXT,
Car_Owner TEXT
);
CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
... |
e_commerce | SELECT count(DISTINCT Payment_method_code) FROM Customer_Payment_Methods | [
"SELECT",
"count",
"(",
"DISTINCT",
"Payment_method_code",
")",
"FROM",
"Customer_Payment_Methods"
] | [
"select",
"count",
"(",
"distinct",
"payment_method_code",
")",
"from",
"customer_payment_methods"
] | How many different payment methods can customers choose from? | [
"How",
"many",
"different",
"payment",
"methods",
"can",
"customers",
"choose",
"from",
"?"
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
parent_product_id NUMBER,
product_name TEXT,
product_price NUMBER,
product_color TEXT,
product_size TEXT,
product_description TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
gender_code TEXT,
customer_first_name TEXT,
customer... |
pilot_1 | SELECT pilot_name FROM pilotskills WHERE plane_name = 'Piper Cub' EXCEPT SELECT pilot_name FROM pilotskills WHERE plane_name = 'B-52 Bomber' | [
"SELECT",
"pilot_name",
"FROM",
"pilotskills",
"WHERE",
"plane_name",
"=",
"'Piper",
"Cub",
"'",
"EXCEPT",
"SELECT",
"pilot_name",
"FROM",
"pilotskills",
"WHERE",
"plane_name",
"=",
"'B-52",
"Bomber",
"'"
] | [
"select",
"pilot_name",
"from",
"pilotskills",
"where",
"plane_name",
"=",
"value",
"except",
"select",
"pilot_name",
"from",
"pilotskills",
"where",
"plane_name",
"=",
"value"
] | What are the names of pilots who have flown Piper Cub but not the B-52 Bomber? | [
"What",
"are",
"the",
"names",
"of",
"pilots",
"who",
"have",
"flown",
"Piper",
"Cub",
"but",
"not",
"the",
"B-52",
"Bomber",
"?"
] | CREATE TABLE PilotSkills (
pilot_name TEXT PRIMARY KEY,
plane_name TEXT,
age NUMBER,
FOREIGN KEY (plane_name) REFERENCES Hangar(plane_name)
);
CREATE TABLE Hangar (
plane_name TEXT PRIMARY KEY,
location TEXT
); |
movie_2 | SELECT title FROM movies WHERE rating = 'null' | [
"SELECT",
"title",
"FROM",
"movies",
"WHERE",
"rating",
"=",
"'null",
"'"
] | [
"select",
"title",
"from",
"movies",
"where",
"rating",
"=",
"value"
] | Find the titles of movies that don’t have any rating. | [
"Find",
"the",
"titles",
"of",
"movies",
"that",
"don’t",
"have",
"any",
"rating",
"."
] | CREATE TABLE Movies (
Code NUMBER PRIMARY KEY,
Title TEXT,
Rating TEXT
);
CREATE TABLE MovieTheaters (
Code NUMBER PRIMARY KEY,
Name TEXT,
Movie NUMBER,
FOREIGN KEY (Movie) REFERENCES Movies(Code)
); |
art_1 | SELECT title , LOCATION , YEAR FROM paintings WHERE height_mm > 1000 ORDER BY title | [
"SELECT",
"title",
",",
"LOCATION",
",",
"YEAR",
"FROM",
"paintings",
"WHERE",
"height_mm",
">",
"1000",
"ORDER",
"BY",
"title"
] | [
"select",
"title",
",",
"location",
",",
"year",
"from",
"paintings",
"where",
"height_mm",
">",
"value",
"order",
"by",
"title"
] | List the year, location, and name of all paintings that are taller than 1000 in alphabetical order. | [
"List",
"the",
"year",
",",
"location",
",",
"and",
"name",
"of",
"all",
"paintings",
"that",
"are",
"taller",
"than",
"1000",
"in",
"alphabetical",
"order",
"."
] | CREATE TABLE Artists (
artistID NUMBER PRIMARY KEY,
lname TEXT,
fname TEXT,
birthYear NUMBER,
deathYear NUMBER
);
CREATE TABLE Paintings (
paintingID NUMBER PRIMARY KEY,
title TEXT,
year NUMBER,
height_mm NUMBER,
width_mm NUMBER,
medium TEXT,
mediumOn TEXT,
location TEXT,
painterID NUMBER,
... |
warehouse_1 | SELECT DISTINCT CONTENTS FROM boxes WHERE value > (SELECT avg(value) FROM boxes) | [
"SELECT",
"DISTINCT",
"CONTENTS",
"FROM",
"boxes",
"WHERE",
"value",
">",
"(",
"SELECT",
"avg",
"(",
"value",
")",
"FROM",
"boxes",
")"
] | [
"select",
"distinct",
"contents",
"from",
"boxes",
"where",
"value",
">",
"(",
"select",
"avg",
"(",
"value",
")",
"from",
"boxes",
")"
] | Find the unique contents of all boxes whose value is higher than the average value of all boxes. | [
"Find",
"the",
"unique",
"contents",
"of",
"all",
"boxes",
"whose",
"value",
"is",
"higher",
"than",
"the",
"average",
"value",
"of",
"all",
"boxes",
"."
] | CREATE TABLE Warehouses (
Code NUMBER PRIMARY KEY,
Location TEXT,
Capacity NUMBER
);
CREATE TABLE Boxes (
Code TEXT PRIMARY KEY,
Contents TEXT,
Value NUMBER,
Warehouse NUMBER,
FOREIGN KEY (Warehouse) REFERENCES Warehouses(Code)
); |
vehicle_driver | SELECT count(*) FROM vehicle WHERE top_speed = (SELECT max(top_speed) FROM vehicle) | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"vehicle",
"WHERE",
"top_speed",
"=",
"(",
"SELECT",
"max",
"(",
"top_speed",
")",
"FROM",
"vehicle",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"vehicle",
"where",
"top_speed",
"=",
"(",
"select",
"max",
"(",
"top_speed",
")",
"from",
"vehicle",
")"
] | How many vehicles have maximum top speed? | [
"How",
"many",
"vehicles",
"have",
"maximum",
"top",
"speed",
"?"
] | CREATE TABLE vehicle (
Vehicle_ID NUMBER PRIMARY KEY,
Model TEXT,
Build_Year TEXT,
Top_Speed NUMBER,
Power NUMBER,
Builder TEXT,
Total_Production TEXT
);
CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
Name TEXT,
Citizenship TEXT,
Racing_Series TEXT
);
CREATE TABLE vehicle_driver (
Driver_ID... |
book_1 | 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... | [
"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",
".",
"idorde... | Show the client names and their total amounts of books ordered. | [
"Show",
"the",
"client",
"names",
"and",
"their",
"total",
"amounts",
"of",
"books",
"ordered",
"."
] | CREATE TABLE Client (
IdClient TEXT PRIMARY KEY,
Name TEXT,
Address TEXT,
NumCC TEXT
);
CREATE TABLE Orders (
IdOrder TEXT PRIMARY KEY,
IdClient TEXT,
DateOrder TIME,
DateExped TIME
);
CREATE TABLE Author (
idAuthor NUMBER PRIMARY KEY,
Name TEXT
);
CREATE TABLE Book (
ISBN TEXT PRIMARY KEY,
Titl... |
book_review | SELECT count(*) FROM book | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"book"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"book"
] | How many books are there? | [
"How",
"many",
"books",
"are",
"there",
"?"
] | CREATE TABLE book (
Book_ID NUMBER PRIMARY KEY,
Title TEXT,
Type TEXT,
Pages NUMBER,
Chapters NUMBER,
Audio TEXT,
Release TEXT
);
CREATE TABLE review (
Review_ID NUMBER PRIMARY KEY,
Book_ID NUMBER,
Rating NUMBER,
Readers_in_Million NUMBER,
Rank NUMBER,
FOREIGN KEY (Book_ID) REFERENCES book(Boo... |
bakery_1 | SELECT id FROM goods WHERE flavor = "Apple" | [
"SELECT",
"id",
"FROM",
"goods",
"WHERE",
"flavor",
"=",
"``",
"Apple",
"''"
] | [
"select",
"id",
"from",
"goods",
"where",
"flavor",
"=",
"value"
] | Find the ids of goods that have apple flavor. | [
"Find",
"the",
"ids",
"of",
"goods",
"that",
"have",
"apple",
"flavor",
"."
] | CREATE TABLE customers (
Id NUMBER PRIMARY KEY,
LastName TEXT,
FirstName TEXT
);
CREATE TABLE goods (
Id TEXT PRIMARY KEY,
Flavor TEXT,
Food TEXT,
Price NUMBER
);
CREATE TABLE items (
Receipt NUMBER PRIMARY KEY,
Ordinal NUMBER,
Item TEXT,
FOREIGN KEY (Item) REFERENCES goods(Id)
);
CREATE TABLE rec... |
address_1 | SELECT city_name FROM City WHERE state = "PA" | [
"SELECT",
"city_name",
"FROM",
"City",
"WHERE",
"state",
"=",
"``",
"PA",
"''"
] | [
"select",
"city_name",
"from",
"city",
"where",
"state",
"=",
"value"
] | What are the names of all cities in PA? | [
"What",
"are",
"the",
"names",
"of",
"all",
"cities",
"in",
"PA",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT,
FOREIGN KEY (city_code) REFERENCES City(city_code)
);
CREATE TABLE Direct_distance (
city1_code TEXT,
city2_code TEXT,
distance NUMBER,
FOREIGN KEY (city... |
car_road_race | 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",... | [
"select",
"t1",
".",
"driver_name",
"from",
"driver",
"as",
"t1",
"join",
"race",
"as",
"t2",
"on",
"t1",
".",
"driver_id",
"=",
"t2",
".",
"driver_id",
"where",
"pole_position",
"=",
"value",
"intersect",
"select",
"t1",
".",
"driver_name",
"from",
"drive... | Find the names of drivers who were in both "James Hinchcliffe" and "Carl Skerlong" pole positions before. | [
"Find",
"the",
"names",
"of",
"drivers",
"who",
"were",
"in",
"both",
"``",
"James",
"Hinchcliffe",
"''",
"and",
"``",
"Carl",
"Skerlong",
"''",
"pole",
"positions",
"before",
"."
] | CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
Driver_Name TEXT,
Entrant TEXT,
Constructor TEXT,
Chassis TEXT,
Engine TEXT,
Age NUMBER
);
CREATE TABLE race (
Road NUMBER PRIMARY KEY,
Driver_ID NUMBER,
Race_Name TEXT,
Pole_Position TEXT,
Fastest_Lap TEXT,
Winning_driver TEXT,
Winning_tea... |
boat_1 | SELECT name , rating , age FROM Sailors ORDER BY rating , age | [
"SELECT",
"name",
",",
"rating",
",",
"age",
"FROM",
"Sailors",
"ORDER",
"BY",
"rating",
",",
"age"
] | [
"select",
"name",
",",
"rating",
",",
"age",
"from",
"sailors",
"order",
"by",
"rating",
",",
"age"
] | What is the name, rating, and age for every sailor? And order them by rating and age. | [
"What",
"is",
"the",
"name",
",",
"rating",
",",
"and",
"age",
"for",
"every",
"sailor",
"?",
"And",
"order",
"them",
"by",
"rating",
"and",
"age",
"."
] | CREATE TABLE Sailors (
sid NUMBER PRIMARY KEY,
name TEXT,
rating NUMBER,
age NUMBER
);
CREATE TABLE Boats (
bid NUMBER PRIMARY KEY,
name TEXT,
color TEXT
);
CREATE TABLE Reserves (
sid NUMBER,
bid NUMBER,
day TEXT,
FOREIGN KEY (bid) REFERENCES Boats(bid),
FOREIGN KEY (sid) REFERENCES Sailors(sid... |
restaurant_bills | SELECT Nationality , COUNT(*) FROM customer GROUP BY Nationality | [
"SELECT",
"Nationality",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"customer",
"GROUP",
"BY",
"Nationality"
] | [
"select",
"nationality",
",",
"count",
"(",
"*",
")",
"from",
"customer",
"group",
"by",
"nationality"
] | How many customers are associated with each nationality? List the nationality and the number of customers. | [
"How",
"many",
"customers",
"are",
"associated",
"with",
"each",
"nationality",
"?",
"List",
"the",
"nationality",
"and",
"the",
"number",
"of",
"customers",
"."
] | CREATE TABLE customer (
Customer_ID NUMBER PRIMARY KEY,
Name TEXT,
Nationality TEXT,
Card_Credit NUMBER,
Level_of_Membership NUMBER
);
CREATE TABLE branch (
Branch_ID NUMBER PRIMARY KEY,
Manager TEXT,
Years_opened NUMBER,
Location_of_office TEXT
);
CREATE TABLE customer_order (
Customer_ID NUMBER PR... |
cre_Students_Information_Systems | SELECT count(DISTINCT student_id) , behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1 | [
"SELECT",
"count",
"(",
"DISTINCT",
"student_id",
")",
",",
"behaviour_monitoring_details",
"FROM",
"Behaviour_Monitoring",
"GROUP",
"BY",
"behaviour_monitoring_details",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"count",
"(",
"distinct",
"student_id",
")",
",",
"behaviour_monitoring_details",
"from",
"behaviour_monitoring",
"group",
"by",
"behaviour_monitoring_details",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | How many students got the most common result in the behavioral monitoring details? Also list the result details. | [
"How",
"many",
"students",
"got",
"the",
"most",
"common",
"result",
"in",
"the",
"behavioral",
"monitoring",
"details",
"?",
"Also",
"list",
"the",
"result",
"details",
"."
] | CREATE TABLE Students (
student_id NUMBER PRIMARY KEY,
bio_data TEXT,
student_details TEXT
);
CREATE TABLE Transcripts (
transcript_id NUMBER PRIMARY KEY,
student_id NUMBER,
date_of_transcript TIME,
transcript_details TEXT,
FOREIGN KEY (student_id) REFERENCES Students(student_id)
);
CREATE TABLE Behavio... |
art_1 | SELECT DISTINCT T1.birthYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID = T2.sculptorID WHERE T2.year > 1920 | [
"SELECT",
"DISTINCT",
"T1.birthYear",
"FROM",
"artists",
"AS",
"T1",
"JOIN",
"sculptures",
"AS",
"T2",
"ON",
"T1.artistID",
"=",
"T2.sculptorID",
"WHERE",
"T2.year",
">",
"1920"
] | [
"select",
"distinct",
"t1",
".",
"birthyear",
"from",
"artists",
"as",
"t1",
"join",
"sculptures",
"as",
"t2",
"on",
"t1",
".",
"artistid",
"=",
"t2",
".",
"sculptorid",
"where",
"t2",
".",
"year",
">",
"value"
] | What is the birth year of each distinct artists who created sculptures after 1920? | [
"What",
"is",
"the",
"birth",
"year",
"of",
"each",
"distinct",
"artists",
"who",
"created",
"sculptures",
"after",
"1920",
"?"
] | CREATE TABLE Artists (
artistID NUMBER PRIMARY KEY,
lname TEXT,
fname TEXT,
birthYear NUMBER,
deathYear NUMBER
);
CREATE TABLE Paintings (
paintingID NUMBER PRIMARY KEY,
title TEXT,
year NUMBER,
height_mm NUMBER,
width_mm NUMBER,
medium TEXT,
mediumOn TEXT,
location TEXT,
painterID NUMBER,
... |
online_exams | SELECT Valid_Answer_Text FROM Valid_Answers GROUP BY Valid_Answer_Text ORDER BY COUNT(*) DESC LIMIT 1 | [
"SELECT",
"Valid_Answer_Text",
"FROM",
"Valid_Answers",
"GROUP",
"BY",
"Valid_Answer_Text",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"valid_answer_text",
"from",
"valid_answers",
"group",
"by",
"valid_answer_text",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | What is the most common valid answer text? | [
"What",
"is",
"the",
"most",
"common",
"valid",
"answer",
"text",
"?"
] | CREATE TABLE Students (
Student_ID NUMBER PRIMARY KEY,
First_Name TEXT,
Middle_Name TEXT,
Last_Name TEXT,
Gender_MFU TEXT,
Student_Address TEXT,
Email_Adress TEXT,
Cell_Mobile_Phone TEXT,
Home_Phone TEXT
);
CREATE TABLE Questions (
Question_ID NUMBER PRIMARY KEY,
Type_of_Question_Code TEXT,
Ques... |
book_1 | 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"
] | [
"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",
"."
] | CREATE TABLE Client (
IdClient TEXT PRIMARY KEY,
Name TEXT,
Address TEXT,
NumCC TEXT
);
CREATE TABLE Orders (
IdOrder TEXT PRIMARY KEY,
IdClient TEXT,
DateOrder TIME,
DateExped TIME
);
CREATE TABLE Author (
idAuthor NUMBER PRIMARY KEY,
Name TEXT
);
CREATE TABLE Book (
ISBN TEXT PRIMARY KEY,
Titl... |
book_1 | SELECT count(*) FROM Client | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Client"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"client"
] | How many clients are there? | [
"How",
"many",
"clients",
"are",
"there",
"?"
] | CREATE TABLE Client (
IdClient TEXT PRIMARY KEY,
Name TEXT,
Address TEXT,
NumCC TEXT
);
CREATE TABLE Orders (
IdOrder TEXT PRIMARY KEY,
IdClient TEXT,
DateOrder TIME,
DateExped TIME
);
CREATE TABLE Author (
idAuthor NUMBER PRIMARY KEY,
Name TEXT
);
CREATE TABLE Book (
ISBN TEXT PRIMARY KEY,
Titl... |
address_1 | select country , count(*) from city group by country | [
"select",
"country",
",",
"count",
"(",
"*",
")",
"from",
"city",
"group",
"by",
"country"
] | [
"select",
"country",
",",
"count",
"(",
"*",
")",
"from",
"city",
"group",
"by",
"country"
] | Show all countries and number of cities in each . | [
"Show",
"all",
"countries",
"and",
"number",
"of",
"cities",
"in",
"each",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT,
FOREIGN KEY (city_code) REFERENCES City(city_code)
);
CREATE TABLE Direct_distance (
city1_code TEXT,
city2_code TEXT,
distance NUMBER,
FOREIGN KEY (city... |
warehouse_1 | SELECT * FROM warehouses | [
"SELECT",
"*",
"FROM",
"warehouses"
] | [
"select",
"*",
"from",
"warehouses"
] | What is all the information about the warehouses? | [
"What",
"is",
"all",
"the",
"information",
"about",
"the",
"warehouses",
"?"
] | CREATE TABLE Warehouses (
Code NUMBER PRIMARY KEY,
Location TEXT,
Capacity NUMBER
);
CREATE TABLE Boxes (
Code TEXT PRIMARY KEY,
Contents TEXT,
Value NUMBER,
Warehouse NUMBER,
FOREIGN KEY (Warehouse) REFERENCES Warehouses(Code)
); |
real_estate_rentals | SELECT DISTINCT T1.county_state_province FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id = T2.property_address_id; | [
"SELECT",
"DISTINCT",
"T1.county_state_province",
"FROM",
"Addresses",
"AS",
"T1",
"JOIN",
"Properties",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.property_address_id",
";"
] | [
"select",
"distinct",
"t1",
".",
"county_state_province",
"from",
"addresses",
"as",
"t1",
"join",
"properties",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"property_address_id"
] | In which states are each of the the properties located? | [
"In",
"which",
"states",
"are",
"each",
"of",
"the",
"the",
"properties",
"located",
"?"
] | CREATE TABLE Ref_Age_Categories (
age_category_code TEXT PRIMARY KEY,
age_category_description TEXT
);
CREATE TABLE Ref_Property_Types (
property_type_code TEXT PRIMARY KEY,
property_type_description TEXT
);
CREATE TABLE Ref_Room_Types (
room_type_code TEXT PRIMARY KEY,
room_type_description TEXT
);
CREATE ... |
customers_and_orders | SELECT T1.customer_id , T2.customer_name , T2.customer_phone , T2.customer_email FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 | [
"SELECT",
"T1.customer_id",
",",
"T2.customer_name",
",",
"T2.customer_phone",
",",
"T2.customer_email",
"FROM",
"Customer_orders",
"AS",
"T1",
"JOIN",
"Customers",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"GROUP",
"BY",
"T1.customer_id",
"ORDER",
"B... | [
"select",
"t1",
".",
"customer_id",
",",
"t2",
".",
"customer_name",
",",
"t2",
".",
"customer_phone",
",",
"t2",
".",
"customer_email",
"from",
"customer_orders",
"as",
"t1",
"join",
"customers",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",... | What is the customer id, name, phone, and email for the customer with most orders? | [
"What",
"is",
"the",
"customer",
"id",
",",
"name",
",",
"phone",
",",
"and",
"email",
"for",
"the",
"customer",
"with",
"most",
"orders",
"?"
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
product_type_code TEXT,
product_name TEXT,
product_price NUMBER
);
CREATE TABLE Addresses (
address_id NUMBER PRIMARY KEY,
address_details TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
address_id NUMBER,
payment_method_code TEXT... |
aan_1 | SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(*) > 50 | [
"SELECT",
"T2.title",
"FROM",
"Citation",
"AS",
"T1",
"JOIN",
"Paper",
"AS",
"T2",
"ON",
"T1.cited_paper_id",
"=",
"T2.paper_id",
"GROUP",
"BY",
"T1.cited_paper_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"50"
] | [
"select",
"t2",
".",
"title",
"from",
"citation",
"as",
"t1",
"join",
"paper",
"as",
"t2",
"on",
"t1",
".",
"cited_paper_id",
"=",
"t2",
".",
"paper_id",
"group",
"by",
"t1",
".",
"cited_paper_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
] | What are the titles for papers with more than 50 citations? | [
"What",
"are",
"the",
"titles",
"for",
"papers",
"with",
"more",
"than",
"50",
"citations",
"?"
] | CREATE TABLE Affiliation (
affiliation_id NUMBER PRIMARY KEY,
name TEXT,
address TEXT
);
CREATE TABLE Author (
author_id NUMBER PRIMARY KEY,
name TEXT,
email TEXT
);
CREATE TABLE Author_list (
paper_id TEXT PRIMARY KEY,
author_id NUMBER,
affiliation_id NUMBER,
FOREIGN KEY (affiliation_id) REFERENCES... |
university_rank | SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1 | [
"SELECT",
"home_conference",
"FROM",
"University",
"GROUP",
"BY",
"home_conference",
"ORDER",
"BY",
"sum",
"(",
"enrollment",
")",
"LIMIT",
"1"
] | [
"select",
"home_conference",
"from",
"university",
"group",
"by",
"home_conference",
"order",
"by",
"sum",
"(",
"enrollment",
")",
"limit",
"value"
] | What are the home conferences with the fewest number of people enrolled? | [
"What",
"are",
"the",
"home",
"conferences",
"with",
"the",
"fewest",
"number",
"of",
"people",
"enrolled",
"?"
] | CREATE TABLE university (
University_ID NUMBER PRIMARY KEY,
University_Name TEXT,
City TEXT,
State TEXT,
Team_Name TEXT,
Affiliation TEXT,
Enrollment NUMBER,
Home_Conference TEXT
);
CREATE TABLE overall_ranking (
Rank NUMBER,
University_ID NUMBER PRIMARY KEY,
Reputation_point NUMBER,
Research_po... |
aan_1 | SELECT T2.title FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id = T2.paper_id GROUP BY T2.paper_id ORDER BY count(*) DESC LIMIT 1 | [
"SELECT",
"T2.title",
"FROM",
"Author_list",
"AS",
"T1",
"JOIN",
"Paper",
"AS",
"T2",
"ON",
"T1.paper_id",
"=",
"T2.paper_id",
"GROUP",
"BY",
"T2.paper_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t2",
".",
"title",
"from",
"author_list",
"as",
"t1",
"join",
"paper",
"as",
"t2",
"on",
"t1",
".",
"paper_id",
"=",
"t2",
".",
"paper_id",
"group",
"by",
"t2",
".",
"paper_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"valu... | What is the title of the paper that has most number of authors? | [
"What",
"is",
"the",
"title",
"of",
"the",
"paper",
"that",
"has",
"most",
"number",
"of",
"authors",
"?"
] | CREATE TABLE Affiliation (
affiliation_id NUMBER PRIMARY KEY,
name TEXT,
address TEXT
);
CREATE TABLE Author (
author_id NUMBER PRIMARY KEY,
name TEXT,
email TEXT
);
CREATE TABLE Author_list (
paper_id TEXT PRIMARY KEY,
author_id NUMBER,
affiliation_id NUMBER,
FOREIGN KEY (affiliation_id) REFERENCES... |
university_rank | SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1 | [
"SELECT",
"university_name",
"FROM",
"University",
"EXCEPT",
"SELECT",
"T2.university_name",
"FROM",
"Major_Ranking",
"AS",
"T1",
"JOIN",
"University",
"AS",
"T2",
"ON",
"T1.university_id",
"=",
"T2.university_id",
"WHERE",
"T1.rank",
"=",
"1"
] | [
"select",
"university_name",
"from",
"university",
"except",
"select",
"t2",
".",
"university_name",
"from",
"major_ranking",
"as",
"t1",
"join",
"university",
"as",
"t2",
"on",
"t1",
".",
"university_id",
"=",
"t2",
".",
"university_id",
"where",
"t1",
".",
"... | Show all university names without a major with rank 1? | [
"Show",
"all",
"university",
"names",
"without",
"a",
"major",
"with",
"rank",
"1",
"?"
] | CREATE TABLE university (
University_ID NUMBER PRIMARY KEY,
University_Name TEXT,
City TEXT,
State TEXT,
Team_Name TEXT,
Affiliation TEXT,
Enrollment NUMBER,
Home_Conference TEXT
);
CREATE TABLE overall_ranking (
Rank NUMBER,
University_ID NUMBER PRIMARY KEY,
Reputation_point NUMBER,
Research_po... |
car_road_race | SELECT Driver_Name FROM driver EXCEPT 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",
"Driver_Name",
"FROM",
"driver",
"EXCEPT",
"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",
"driver_name",
"from",
"driver",
"except",
"select",
"t1",
".",
"driver_name",
"from",
"driver",
"as",
"t1",
"join",
"race",
"as",
"t2",
"on",
"t1",
".",
"driver_id",
"=",
"t2",
".",
"driver_id",
"where",
"pole_position",
"=",
"value"
] | What are the names of drivers except for those who had the pole position James Hinchcliffe? | [
"What",
"are",
"the",
"names",
"of",
"drivers",
"except",
"for",
"those",
"who",
"had",
"the",
"pole",
"position",
"James",
"Hinchcliffe",
"?"
] | CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
Driver_Name TEXT,
Entrant TEXT,
Constructor TEXT,
Chassis TEXT,
Engine TEXT,
Age NUMBER
);
CREATE TABLE race (
Road NUMBER PRIMARY KEY,
Driver_ID NUMBER,
Race_Name TEXT,
Pole_Position TEXT,
Fastest_Lap TEXT,
Winning_driver TEXT,
Winning_tea... |
sing_contest | SELECT T1.id , T1.name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id WHERE T2.voice_sound_quality = 5 OR T2.rhythm_tempo = 5 | [
"SELECT",
"T1.id",
",",
"T1.name",
"FROM",
"participants",
"AS",
"T1",
"JOIN",
"performance_score",
"AS",
"T2",
"ON",
"T2.participant_id",
"=",
"T1.id",
"WHERE",
"T2.voice_sound_quality",
"=",
"5",
"OR",
"T2.rhythm_tempo",
"=",
"5"
] | [
"select",
"t1",
".",
"id",
",",
"t1",
".",
"name",
"from",
"participants",
"as",
"t1",
"join",
"performance_score",
"as",
"t2",
"on",
"t2",
".",
"participant_id",
"=",
"t1",
".",
"id",
"where",
"t2",
".",
"voice_sound_quality",
"=",
"value",
"or",
"t2",
... | What are the id and name of the participants who received score 5 for their sound quality or rhythm tempo? | [
"What",
"are",
"the",
"id",
"and",
"name",
"of",
"the",
"participants",
"who",
"received",
"score",
"5",
"for",
"their",
"sound",
"quality",
"or",
"rhythm",
"tempo",
"?"
] | CREATE TABLE participants (
id NUMBER PRIMARY KEY,
name TEXT,
popularity NUMBER
);
CREATE TABLE songs (
id NUMBER PRIMARY KEY,
language TEXT,
original_artist TEXT,
name TEXT,
english_translation TEXT
);
CREATE TABLE performance_score (
participant_id NUMBER PRIMARY KEY,
songs_id NUMBER,
voice_soun... |
aan_1 | SELECT count(*) FROM Author WHERE Author_id NOT IN ( SELECT T2.author_id FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id = T2.paper_id GROUP BY T1.cited_paper_id HAVING count(DISTINCT T1.paper_id) > 50) | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Author",
"WHERE",
"Author_id",
"NOT",
"IN",
"(",
"SELECT",
"T2.author_id",
"FROM",
"Citation",
"AS",
"T1",
"JOIN",
"Author_list",
"AS",
"T2",
"ON",
"T1.cited_paper_id",
"=",
"T2.paper_id",
"GROUP",
"BY",
"T1.cited_pap... | [
"select",
"count",
"(",
"*",
")",
"from",
"author",
"where",
"author_id",
"not",
"in",
"(",
"select",
"t2",
".",
"author_id",
"from",
"citation",
"as",
"t1",
"join",
"author_list",
"as",
"t2",
"on",
"t1",
".",
"cited_paper_id",
"=",
"t2",
".",
"paper_id"... | How many authors have not published a paper with more than 50 citations? | [
"How",
"many",
"authors",
"have",
"not",
"published",
"a",
"paper",
"with",
"more",
"than",
"50",
"citations",
"?"
] | CREATE TABLE Affiliation (
affiliation_id NUMBER PRIMARY KEY,
name TEXT,
address TEXT
);
CREATE TABLE Author (
author_id NUMBER PRIMARY KEY,
name TEXT,
email TEXT
);
CREATE TABLE Author_list (
paper_id TEXT PRIMARY KEY,
author_id NUMBER,
affiliation_id NUMBER,
FOREIGN KEY (affiliation_id) REFERENCES... |
pilot_1 | SELECT count(pilot_name) FROM pilotskills WHERE age > (SELECT min(age) FROM pilotskills WHERE plane_name = 'Piper Cub') | [
"SELECT",
"count",
"(",
"pilot_name",
")",
"FROM",
"pilotskills",
"WHERE",
"age",
">",
"(",
"SELECT",
"min",
"(",
"age",
")",
"FROM",
"pilotskills",
"WHERE",
"plane_name",
"=",
"'Piper",
"Cub",
"'",
")"
] | [
"select",
"count",
"(",
"pilot_name",
")",
"from",
"pilotskills",
"where",
"age",
">",
"(",
"select",
"min",
"(",
"age",
")",
"from",
"pilotskills",
"where",
"plane_name",
"=",
"value",
")"
] | How many pilots are older than the youngest pilot who has Piper Cub? | [
"How",
"many",
"pilots",
"are",
"older",
"than",
"the",
"youngest",
"pilot",
"who",
"has",
"Piper",
"Cub",
"?"
] | CREATE TABLE PilotSkills (
pilot_name TEXT PRIMARY KEY,
plane_name TEXT,
age NUMBER,
FOREIGN KEY (plane_name) REFERENCES Hangar(plane_name)
);
CREATE TABLE Hangar (
plane_name TEXT PRIMARY KEY,
location TEXT
); |
car_road_race | SELECT Winning_team FROM race GROUP BY Winning_team HAVING count(*) > 1 | [
"SELECT",
"Winning_team",
"FROM",
"race",
"GROUP",
"BY",
"Winning_team",
"HAVING",
"count",
"(",
"*",
")",
">",
"1"
] | [
"select",
"winning_team",
"from",
"race",
"group",
"by",
"winning_team",
"having",
"count",
"(",
"*",
")",
">",
"value"
] | Find the teams that won more than once. | [
"Find",
"the",
"teams",
"that",
"won",
"more",
"than",
"once",
"."
] | CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
Driver_Name TEXT,
Entrant TEXT,
Constructor TEXT,
Chassis TEXT,
Engine TEXT,
Age NUMBER
);
CREATE TABLE race (
Road NUMBER PRIMARY KEY,
Driver_ID NUMBER,
Race_Name TEXT,
Pole_Position TEXT,
Fastest_Lap TEXT,
Winning_driver TEXT,
Winning_tea... |
address_1 | SELECT T2.Fname , T2.Lname FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.state = "MD" | [
"SELECT",
"T2.Fname",
",",
"T2.Lname",
"FROM",
"City",
"AS",
"T1",
"JOIN",
"Student",
"AS",
"T2",
"ON",
"T1.city_code",
"=",
"T2.city_code",
"WHERE",
"T1.state",
"=",
"``",
"MD",
"''"
] | [
"select",
"t2",
".",
"fname",
",",
"t2",
".",
"lname",
"from",
"city",
"as",
"t1",
"join",
"student",
"as",
"t2",
"on",
"t1",
".",
"city_code",
"=",
"t2",
".",
"city_code",
"where",
"t1",
".",
"state",
"=",
"value"
] | What are the full names of students living in MD? | [
"What",
"are",
"the",
"full",
"names",
"of",
"students",
"living",
"in",
"MD",
"?"
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT,
FOREIGN KEY (city_code) REFERENCES City(city_code)
);
CREATE TABLE Direct_distance (
city1_code TEXT,
city2_code TEXT,
distance NUMBER,
FOREIGN KEY (city... |
advertising_agencies | SELECT count(DISTINCT staff_id) FROM Staff_in_meetings | [
"SELECT",
"count",
"(",
"DISTINCT",
"staff_id",
")",
"FROM",
"Staff_in_meetings"
] | [
"select",
"count",
"(",
"distinct",
"staff_id",
")",
"from",
"staff_in_meetings"
] | Return the number of distinct staff who have attended a meeting? | [
"Return",
"the",
"number",
"of",
"distinct",
"staff",
"who",
"have",
"attended",
"a",
"meeting",
"?"
] | CREATE TABLE Agencies (
agency_id NUMBER PRIMARY KEY,
agency_details TEXT
);
CREATE TABLE Staff (
staff_id NUMBER PRIMARY KEY,
agency_id NUMBER,
staff_details TEXT
);
CREATE TABLE Clients (
client_id NUMBER PRIMARY KEY,
agency_id NUMBER,
sic_code TEXT,
client_details TEXT,
FOREIGN KEY (agency_id) RE... |
vehicle_driver | SELECT count(*) FROM vehicle WHERE top_speed = (SELECT max(top_speed) FROM vehicle) | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"vehicle",
"WHERE",
"top_speed",
"=",
"(",
"SELECT",
"max",
"(",
"top_speed",
")",
"FROM",
"vehicle",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"vehicle",
"where",
"top_speed",
"=",
"(",
"select",
"max",
"(",
"top_speed",
")",
"from",
"vehicle",
")"
] | Count the number of vehicles that have a top speed equal to the maximum across all vehicles. | [
"Count",
"the",
"number",
"of",
"vehicles",
"that",
"have",
"a",
"top",
"speed",
"equal",
"to",
"the",
"maximum",
"across",
"all",
"vehicles",
"."
] | CREATE TABLE vehicle (
Vehicle_ID NUMBER PRIMARY KEY,
Model TEXT,
Build_Year TEXT,
Top_Speed NUMBER,
Power NUMBER,
Builder TEXT,
Total_Production TEXT
);
CREATE TABLE driver (
Driver_ID NUMBER PRIMARY KEY,
Name TEXT,
Citizenship TEXT,
Racing_Series TEXT
);
CREATE TABLE vehicle_driver (
Driver_ID... |
address_1 | SELECT state FROM Student AS T1 JOIN City AS T2 ON T1.city_code = T2.city_code WHERE T1.Fname = "Linda" | [
"SELECT",
"state",
"FROM",
"Student",
"AS",
"T1",
"JOIN",
"City",
"AS",
"T2",
"ON",
"T1.city_code",
"=",
"T2.city_code",
"WHERE",
"T1.Fname",
"=",
"``",
"Linda",
"''"
] | [
"select",
"state",
"from",
"student",
"as",
"t1",
"join",
"city",
"as",
"t2",
"on",
"t1",
".",
"city_code",
"=",
"t2",
".",
"city_code",
"where",
"t1",
".",
"fname",
"=",
"value"
] | Give the state that the student with first name Linda lives in. | [
"Give",
"the",
"state",
"that",
"the",
"student",
"with",
"first",
"name",
"Linda",
"lives",
"in",
"."
] | CREATE TABLE Student (
StuID NUMBER PRIMARY KEY,
LName TEXT,
Fname TEXT,
Age NUMBER,
Sex TEXT,
Major NUMBER,
Advisor NUMBER,
city_code TEXT,
FOREIGN KEY (city_code) REFERENCES City(city_code)
);
CREATE TABLE Direct_distance (
city1_code TEXT,
city2_code TEXT,
distance NUMBER,
FOREIGN KEY (city... |
cre_Doc_Workflow | 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",
"?"
] | CREATE TABLE Staff (
staff_id NUMBER PRIMARY KEY,
staff_details TEXT
);
CREATE TABLE Ref_Staff_Roles (
staff_role_code TEXT PRIMARY KEY,
staff_role_description TEXT
);
CREATE TABLE Process_Outcomes (
process_outcome_code TEXT PRIMARY KEY,
process_outcome_description TEXT
);
CREATE TABLE Process_Status (
p... |
art_1 | SELECT title FROM paintings WHERE YEAR BETWEEN 1900 AND 1950 UNION SELECT title FROM sculptures WHERE YEAR BETWEEN 1900 AND 1950 | [
"SELECT",
"title",
"FROM",
"paintings",
"WHERE",
"YEAR",
"BETWEEN",
"1900",
"AND",
"1950",
"UNION",
"SELECT",
"title",
"FROM",
"sculptures",
"WHERE",
"YEAR",
"BETWEEN",
"1900",
"AND",
"1950"
] | [
"select",
"title",
"from",
"paintings",
"where",
"year",
"between",
"value",
"and",
"value",
"union",
"select",
"title",
"from",
"sculptures",
"where",
"year",
"between",
"value",
"and",
"value"
] | What are the names of paintings and scupltures created between 1900 and 1950? | [
"What",
"are",
"the",
"names",
"of",
"paintings",
"and",
"scupltures",
"created",
"between",
"1900",
"and",
"1950",
"?"
] | CREATE TABLE Artists (
artistID NUMBER PRIMARY KEY,
lname TEXT,
fname TEXT,
birthYear NUMBER,
deathYear NUMBER
);
CREATE TABLE Paintings (
paintingID NUMBER PRIMARY KEY,
title TEXT,
year NUMBER,
height_mm NUMBER,
width_mm NUMBER,
medium TEXT,
mediumOn TEXT,
location TEXT,
painterID NUMBER,
... |
pilot_1 | SELECT pilot_name FROM pilotskills ORDER BY age DESC | [
"SELECT",
"pilot_name",
"FROM",
"pilotskills",
"ORDER",
"BY",
"age",
"DESC"
] | [
"select",
"pilot_name",
"from",
"pilotskills",
"order",
"by",
"age",
"desc"
] | What are the names of pilots, ordered by age descending? | [
"What",
"are",
"the",
"names",
"of",
"pilots",
",",
"ordered",
"by",
"age",
"descending",
"?"
] | CREATE TABLE PilotSkills (
pilot_name TEXT PRIMARY KEY,
plane_name TEXT,
age NUMBER,
FOREIGN KEY (plane_name) REFERENCES Hangar(plane_name)
);
CREATE TABLE Hangar (
plane_name TEXT PRIMARY KEY,
location TEXT
); |
customers_and_orders | 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"
] | What are the product type code with at least two products? | [
"What",
"are",
"the",
"product",
"type",
"code",
"with",
"at",
"least",
"two",
"products",
"?"
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
product_type_code TEXT,
product_name TEXT,
product_price NUMBER
);
CREATE TABLE Addresses (
address_id NUMBER PRIMARY KEY,
address_details TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
address_id NUMBER,
payment_method_code TEXT... |
restaurant_bills | SELECT DISTINCT Manager FROM branch | [
"SELECT",
"DISTINCT",
"Manager",
"FROM",
"branch"
] | [
"select",
"distinct",
"manager",
"from",
"branch"
] | Who are the distinct managers of branches? | [
"Who",
"are",
"the",
"distinct",
"managers",
"of",
"branches",
"?"
] | CREATE TABLE customer (
Customer_ID NUMBER PRIMARY KEY,
Name TEXT,
Nationality TEXT,
Card_Credit NUMBER,
Level_of_Membership NUMBER
);
CREATE TABLE branch (
Branch_ID NUMBER PRIMARY KEY,
Manager TEXT,
Years_opened NUMBER,
Location_of_office TEXT
);
CREATE TABLE customer_order (
Customer_ID NUMBER PR... |
advertising_agencies | SELECT T1.invoice_status , T1.invoice_details , T2.client_id , T2.client_details , T3.agency_id , T3.agency_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id = T2.client_id JOIN Agencies AS T3 ON T2.agency_id = T3.agency_id | [
"SELECT",
"T1.invoice_status",
",",
"T1.invoice_details",
",",
"T2.client_id",
",",
"T2.client_details",
",",
"T3.agency_id",
",",
"T3.agency_details",
"FROM",
"Invoices",
"AS",
"T1",
"JOIN",
"Clients",
"AS",
"T2",
"ON",
"T1.client_id",
"=",
"T2.client_id",
"JOIN",
... | [
"select",
"t1",
".",
"invoice_status",
",",
"t1",
".",
"invoice_details",
",",
"t2",
".",
"client_id",
",",
"t2",
".",
"client_details",
",",
"t3",
".",
"agency_id",
",",
"t3",
".",
"agency_details",
"from",
"invoices",
"as",
"t1",
"join",
"clients",
"as",... | What are the invoice status, invoice details, and corresponding client ids and details and agency id and details? | [
"What",
"are",
"the",
"invoice",
"status",
",",
"invoice",
"details",
",",
"and",
"corresponding",
"client",
"ids",
"and",
"details",
"and",
"agency",
"id",
"and",
"details",
"?"
] | CREATE TABLE Agencies (
agency_id NUMBER PRIMARY KEY,
agency_details TEXT
);
CREATE TABLE Staff (
staff_id NUMBER PRIMARY KEY,
agency_id NUMBER,
staff_details TEXT
);
CREATE TABLE Clients (
client_id NUMBER PRIMARY KEY,
agency_id NUMBER,
sic_code TEXT,
client_details TEXT,
FOREIGN KEY (agency_id) RE... |
cre_Students_Information_Systems | SELECT datetime_detention_start FROM Detention | [
"SELECT",
"datetime_detention_start",
"FROM",
"Detention"
] | [
"select",
"datetime_detention_start",
"from",
"detention"
] | Give me the detention start date for all the detention records. | [
"Give",
"me",
"the",
"detention",
"start",
"date",
"for",
"all",
"the",
"detention",
"records",
"."
] | CREATE TABLE Students (
student_id NUMBER PRIMARY KEY,
bio_data TEXT,
student_details TEXT
);
CREATE TABLE Transcripts (
transcript_id NUMBER PRIMARY KEY,
student_id NUMBER,
date_of_transcript TIME,
transcript_details TEXT,
FOREIGN KEY (student_id) REFERENCES Students(student_id)
);
CREATE TABLE Behavio... |
e_commerce | SELECT avg(product_price) FROM Products | [
"SELECT",
"avg",
"(",
"product_price",
")",
"FROM",
"Products"
] | [
"select",
"avg",
"(",
"product_price",
")",
"from",
"products"
] | What is the product average price? | [
"What",
"is",
"the",
"product",
"average",
"price",
"?"
] | CREATE TABLE Products (
product_id NUMBER PRIMARY KEY,
parent_product_id NUMBER,
product_name TEXT,
product_price NUMBER,
product_color TEXT,
product_size TEXT,
product_description TEXT
);
CREATE TABLE Customers (
customer_id NUMBER PRIMARY KEY,
gender_code TEXT,
customer_first_name TEXT,
customer... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.