db_id stringclasses 66
values | question stringlengths 24 325 | evidence stringlengths 1 673 ⌀ | gold_query stringlengths 23 804 | db_schema stringclasses 66
values |
|---|---|---|---|---|
chicago_crime | Give the neighborhood name of West Englewood community. | West Englewood community refers to community_area_name = 'West Englewood' | SELECT T1.neighborhood_name FROM Neighborhood AS T1 INNER JOIN Community_Area AS T2 ON T1.community_area_no = T2.community_area_no WHERE T2.community_area_name = 'West Englewood' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | How many times is the number of territories in "Eastern Region" than "Southern Region"? | "Eastern Region" refers to RegionDescription = 'Eastern'; "Southern Region" refers to RegionDescription = 'Southern'; times = divide(count(TerritoryDescription where RegionDescription = 'Eastern') , count(TerritoryDescription where RegionDescription = 'Southern')) | SELECT CAST(( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ) AS REAL) / ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern' ) ... | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | What percentage of the orders placed by Kaleena were shipped by the international method? | shipped by international method refers to method_name = 'International'; percentage = Divide (Sum(method_name = 'International'), Count(method_name)) * 100 | SELECT CAST(SUM(CASE WHEN T3.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Kaleena' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
app_store | List down app that does not have negative sentiment and give their average rating? | doest not have negative sentiment refers to Sentiment! = 'Negative'; average = AVG(Sentiment_Polarity); | SELECT T1.App, AVG(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment != 'Negative' GROUP BY T1.App | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | Who was the alderman of the legislative district where case No. JB103470 took place? Give the full name. | case No. JB103470 refers to case_number = 'JB103470'; full name refers to alderman_first_name, alderman_last_name | SELECT T1.alderman_first_name, T1.alderman_last_name FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.case_number = 'JB103470' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | How many percent more orders were fulfilled with shipper company "United Package" than with "Speedy Express"? | percent = divide(subtract(count(OrderID where CompanyName = 'United Package') , count(OrderID where CompanyName = 'Speedy Express')) , count(OrderID where CompanyName = 'Speedy Express')) * 100% | SELECT CAST((COUNT(CASE WHEN T2.CompanyName = 'United Package' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END)) AS REAL) * 100 / COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperI... | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
chicago_crime | Give the name of the community area which had the most pocket-picking thefts. | name of the community area refers to community_area_name; the most refers to max(case_number); pocket-picking theft refers to primary_description = 'THEFT' AND secondary_description = 'POCKET-PICKING' | SELECT T3.community_area_name FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.primary_description = 'THEFT' AND T1.secondary_description = 'POCKET-PICKING' GROUP BY T2.community_area_no ORDER BY T2.case_number DESC... | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | For the orders of Customer "WHITC", what is the percentage of the orders were fulfilled with shipper company "United Package"? | Customer "WHITC" refers to CustomerID = 'WHITC'; shipper company "United Package" refers to CompanyName = 'United Package'; percentage = divide(count(ShipperID where CompanyName = 'United Package') , count(ShipperID)) * 100% | SELECT CAST(COUNT(CASE WHEN T2.CompanyName = 'United Package' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.CustomerID = 'WHITC' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
app_store | What is the percentage for free application with a rating 4.5 and above have not been updated since 2018? | paid refers to Type = 'Paid'; application refers to App; Rating>4.5; Last Updated>'2018; percentage = DIVIDE(SUM(Genres = 'Mature 17+' and Rating>4.5 and substr("Last Updated",-4,4)>'2018' )), (COUNT(App)) as percent; | SELECT CAST(SUM(CASE WHEN SUBSTR('Last Updated', -4) > '2018' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(App) PER FROM playstore WHERE Type = 'Free' AND Rating >= 4.5 | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | How severe was case JB296775? Give the index code for severity. | index code refers to iucr_no; case JB296775 refers to case_number = 'JB296775' | SELECT T2.iucr_no FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.case_number = 'JB296775' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Which region is "Columbia" in? | region refers to RegionID; "Columbia" refers to TerritoryDescription = 'Columbia' | SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Columbia' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | List every book that Ursola Purdy has ordered. | book refers to title | SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Ursola' AND T4.last_name = 'Purdy' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
app_store | What is the average price of games belonging in the arcade genre which has a content rating of Everyone 10+? | average price = AVG(Price); | SELECT AVG(Price) FROM playstore WHERE 'Content Rating' = 'Everyone 10+' AND Genres = 'Arcade' | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | Which district had the most number of first degree murders? Give the district number. | the most number refers to max(count(case_number)); first degree murder refers to secondary_description = 'FIRST DEGREE MURDER'; district number refers to district_no | SELECT T2.district_no FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.secondary_description = 'FIRST DEGREE MURDER' GROUP BY T2.district_no ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Give the number of territories in the "Northern" region. | "Northern" region refers to RegionDescription = 'Northern' | SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | What is the average number of pages in the books written by Jennifer Crusie? | "Jennifer Crusie" is the author_name; average number of pages refers to AVG(num_pages) | SELECT AVG(T1.num_pages) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Jennifer Crusie' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
genes | Among the genes with nucleic acid metabolism defects, how many of them can be found in the vacuole? | null | SELECT COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Classification AS T2 ON T1.GeneID = T2.GeneID WHERE T2.Localization = 'vacuole' AND T1.Phenotype = 'Nucleic acid metabolism defects' | CREATE TABLE Interactions
(
foreign key (GeneID1) references Classification (GeneID) on update cascade on delete cascade,
primary key (GeneID1, GeneID2),
foreign key (GeneID2) references Classification (GeneID) on update cascade on delete cascade,
GeneID2 TEXT not null, --
GeneID1 TEXT not null, --
Expression... |
chicago_crime | How many simple assaults happened on 2018/9/8? | simple assault refers to primary_description = 'ASSAULT'AND secondary_description = 'SIMPLE'; on 2018/9/8 refers to date like '%9/8/2018%' | SELECT SUM(CASE WHEN T2.secondary_description = 'SIMPLE' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.date LIKE '%9/8/2018%' AND T2.primary_description = 'ASSAULT' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Tell the country name of the supplier for "Scottish Longbreads". | "Scottish Longbreads" refers to ProductName = 'Scottish Longbreads' | SELECT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Scottish Longbreads' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
chicago_crime | Give the name of the person who was responsible for case No.JB524952. | name of the person refers to commander; case No.JB524952 refers to case_number = 'JB524952' | SELECT T1.commander FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T2.case_number = 'JB524952' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Give the contact name of the supplier for the product "Gudbrandsdalsost". | product refers to ProductName | SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Gudbrandsdalsost' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
app_store | Name the Apps with a sentiment objectivity of 0.3 and include their number of installs. | FALSE; | SELECT DISTINCT T1.App, T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity = 0.3 | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | Where is the coordinate (41.66236555, -87.63470194) located? Give the name of the district. | coordinate (41.66236555, -87.63470194) refers to latitude = '41.66236555' AND longitude = '-87.63470194'; name of the district refers to district_name | SELECT T2.district_name FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.longitude = '-87.63470194' AND T1.latitude = '41.66236555' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | How many kinds of products are supplied by "Karkki Oy" company? | supplied by refers to CompanyName | SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Karkki Oy' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | Provide the full name of the customers who have ordered the book The Sorrows of Young Werther. | full name refers to first_name, last_name; 'The Sorrows of Young Werther' is the title of the book | SELECT T4.first_name, T4.last_name FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'The Sorrows of Young Werther' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
app_store | List down the rating for the App Learn C++. | FALSE; | SELECT DISTINCT Rating FROM playstore WHERE App = 'Learn C++' | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | Where did case No. JB100065 happen? Give the name of the district. | case No. JB100065 refers to case_number = 'JB100065'; name of the district refers to district_name | SELECT T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T2.case_number = 'JB100065' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Give the reorder level for the products from the supplier "Nord-Ost-Fisch Handelsgesellschaft mbH". | supplier "Nord-Ost-Fisch Handelsgesellschaft mbH" refers to CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH' | SELECT T1.ReorderLevel FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
chicago_crime | Who is the commander of Morgan Park district? | Morgan Park district refers to district_name = 'Morgan Park' | SELECT commander FROM District WHERE district_name = 'Morgan Park' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | What is the total production of the products from the supplier “Escargots Nouveaux”? | total production of the products = add(units in stock , units on order); supplier “Escargots Nouveaux” refers to CompanyName = 'Escargots Nouveaux' | SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Escargots Nouveaux' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | How many books written by Akira Watanabe are available on Gravity? | "Akira Watanabe" is the author_name | SELECT COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T1.author_id = T2.author_id WHERE T1.author_name = 'Akira Watanabe' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
app_store | How much is the size of Browser 4G and how many users have a pretty positive favorability on it? | Browser 4G is the App; pretty positive favorability refers to Sentiment_Polarity score = 0.5 | SELECT T1.Size, COUNT(T1.App) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Browser 4G' AND T2.Sentiment_Polarity >= 0.5 | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | How many community areas are in the Far North side? | the Far North side refers to side = 'Far North' | SELECT COUNT(*) FROM Community_Area WHERE side = 'Far North ' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Which category does "tofu" belong to? | category refers to CategoryName; tofu refers to ProductName = 'Tofu'; | SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.ProductName = 'Tofu' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
app_store | List the top 5 lowest rated puzzle games and count the number of negative sentiments the games received. | lowest rating refers to MIN(Rating); puzzle is the genre; | SELECT T1.App, COUNT(T1.App) COUNTNUMBER FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment = 'Negative' GROUP BY T1.App ORDER BY T1.Rating LIMIT 5 | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | Among the crimes in all the districts in Chicago, what is the percentage of them happening in the Central district? | the Central district refers to district_name = 'Central'; percentage = divide(count(case_number where district_name = 'Central'), count(case_number)) * 100% | SELECT CAST(SUM(CASE WHEN T2.district_name = 'Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.case_number) FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | How many kinds of products are there in the the category of "dairy products"? | kinds of products refers to ProductID; category refers to CategoryName; | SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Dairy Products' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
chicago_crime | What is the average number of crimes in a neighborhood in Central Chicago? | Central Chicago refers to side = 'Central'; average number = divide(count(report_no), count(community_area_no)) | SELECT CAST(COUNT(T1.report_no) AS REAL) / COUNT(T2.community_area_no) FROM Crime AS T1 INNER JOIN Community_Area AS T2 ON T1.community_area_no = T2.community_area_no WHERE T2.side = 'Central' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Give the number of orders that were shipped by "Federal Shipping". | Federal Shipping refers to CompanyName = 'Federal Shipping'; | SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
genes | Please list the location of the genes that have the most chromosomes. | null | SELECT T2.Localization FROM Genes AS T1 INNER JOIN Classification AS T2 ON T1.GeneID = T2.GeneID ORDER BY T1.Chromosome DESC LIMIT 1 | CREATE TABLE Interactions
(
foreign key (GeneID1) references Classification (GeneID) on update cascade on delete cascade,
primary key (GeneID1, GeneID2),
foreign key (GeneID2) references Classification (GeneID) on update cascade on delete cascade,
GeneID2 TEXT not null, --
GeneID1 TEXT not null, --
Expression... |
chicago_crime | What is the fax number for the district with the most number of crimes in January, 2018? | fax number refers to fax; the most number of crimes refers to max(count(case_number)); in January 2018 refers to date like '%1/2018%' | SELECT T1.fax FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T2.date LIKE '%1/2018%' GROUP BY T2.district_no ORDER BY COUNT(case_number) DESC LIMIT 1 | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Tell the name of the shipper company for the order No.10585. | name of the shipper company refers to ShipName; order No. refers to OrderID; | SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10585 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
chicago_crime | More crimes happened in which community area in January, 2018, Woodlawn or Lincoln Square? | in January 2018 refers to date like '%1/2018%'; Woodlawn or Lincoln Square refers to community_area_name in ('Woodlawn', 'Lincoln Square'); number of crime refers to COUNT(report_no); the higher the report_no, the more crimes happened in the community; | SELECT T1.community_area_name FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.community_area_name IN ('Woodlawn', 'Lincoln Square') AND T2.date LIKE '%1/2018%' GROUP BY T1.community_area_name ORDER BY COUNT(T1.community_area_name) DESC LIMIT 1 | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | For the order paying the highest freight, how many kinds of products does it contain? | highest freight refers to MAX(Freight); kinds of products refers to ProductID; | SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.Freight = ( SELECT MAX(Freight) FROM Orders ) GROUP BY T1.OrderID | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | Who is the author of the book The Mystery in the Rocky Mountains? | author refers to author_name; 'The Mystery in the Rocky Mountains' is the title of the book | SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.title = 'The Mystery in the Rocky Mountains' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
app_store | Indicate the number of installs and include the percentage of positive sentiments of FREEDOME VPN Unlimited anonymous Wifi Security. | FREEDOME VPN Unlimited anonymous Wifi Security is the App; percentage = MULTIPLY(DIVIDE((SUM(Sentiment = 'Positive')), (COUNT(*))), 100) | SELECT T1.Installs , CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) * 100 / SUM(CASE WHEN T2.Sentiment IS NOT NULL THEN 1.0 ELSE 0 END) AS REAL) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'FREEDOME VPN Unlimited anonymous Wifi Security' | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | Among the crimes in Woodlawn, how many of them happened in January, 2018? | Woodlawn refers to community_area_name = 'Woodlawn'; in January 2018 refers to date like '%1/2018%' | SELECT SUM(CASE WHEN T1.community_area_name = 'Woodlawn' THEN 1 ELSE 0 END) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no WHERE T2.date LIKE '%1/2018%' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | For the order from "HILAA" on 1997/12/25, what was the total quantity of the products in that order? | HILLA refers to CustomerID = 'HILAA'; on 1997/12/25 refers to OrderDate = '1997/12/25'; | SELECT SUM(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.CustomerID = 'HILAA' AND T1.OrderDate LIKE '1997-12-25%' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | Who is the author of the book with the biggest page count? | author refers to author_name, biggest page count refers to Max(num_pages) | SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id ORDER BY T1.num_pages DESC LIMIT 1 | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
chicago_crime | How many crimes had happened in the community area with the most population? | the most population refers to max(population) | SELECT COUNT(T2.report_no) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no GROUP BY T1.community_area_name ORDER BY T1.population DESC LIMIT 1 | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Give the home phone number of the employee who is in charge of "Savannah" territory. | home phone number refers to HomePhone; Savannah refers to TerritoryDescription = 'Savannah'; | SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Savannah' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | Provide the full address of Ursola Purdy. | full address refers to street_number, street_name, city, country_name | SELECT T3.street_number, T3.street_name, T3.city FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN country AS T4 ON T4.country_id = T3.country_id WHERE T1.first_name = 'Ursola' AND T1.last_name = 'Purdy' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
app_store | How much is the average sentiment polarity score of Golf GPS Rangefinder: Golf Pad and what is it's rating in the Google Play Store? | average sentiment polarity score = AVG(Sentiment_Polarity); Golf GPS Rangefinder: Golf Pad is the App; | SELECT AVG(T2.Sentiment_Polarity), T1.Rating FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Golf GPS Rangefinder: Golf Pad' | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | Please list the case numbers of all the crimes with no arrest made in Central Chicago. | no arrest made refers to arrest = 'FALSE'; Central Chicago refers to district_name = 'Central' | SELECT COUNT(*) FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T2.district_name = 'Central' AND T1.arrest = 'FALSE' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Who is in charge of the "Santa Monica" territory? Give the full name. | Santa Monica refers to TerritoryDescription = 'Santa Monica'; full name = FirstName, MiddleName, LastName; | SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Santa Monica' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | Name the publisher of the oldest book. | publisher refers to publisher_name; oldest book refers to Min(publication_date) | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id ORDER BY T1.publication_date ASC LIMIT 1 | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
chicago_crime | Among all the crimes that had happened in Central Chicago, how many of them were cases of domestic violence? | Central Chicago refers to district_name = 'Central'; case of domestic violence refers to domestic = 'TRUE' | SELECT COUNT(*) FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T2.district_name = 'Central' AND T1.domestic = 'TRUE' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Which territory does Ms. Laura Callahan's direct supervisor work in? Give the name of the territory. | Ms. refers to TitleOfCourtesy = 'Ms'; ReportsTo’ represents a hierarchical relationship where the person being reported to is usually the direct supervisor of the reporter; name of the territory refers to TerritoryDescription; | SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.EmployeeID = ( SELECT ReportsTo FROM Employees WHERE TitleOfCourtesy = 'Ms.' AND FirstName = 'Laura' AND LastName = 'Callahan... | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
app_store | What is the percentage ratio between positive sentiments and negative sentiments that are in Fate/Grand Order? Also indicate the current version. | Fate/Grand Order is the App; percentage ratio = MULTIPLY(DIVIDE((SUM(Sentiment = 'Positive')), (SUM(Sentiment = 'Negative'))), 100); | SELECT CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Sentiment = 'Negative' THEN 1 ELSE 0 END), T1.`Current Ver` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Fate/Grand Order (English)' AND T1.`Current Ver` = '1.18.0' | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | How many crimes had happened in Central Chicago? | Central Chicago refers to district_name = 'Central' | SELECT COUNT(*) FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T2.district_name = 'Central' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Give the name of the territory where Mr. Robert King works. | name of territory refers to TerritoryDescription; Mr. refers to TitleOfCourtesy = 'Mr'; | SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.TitleOfCourtesy = 'Mr.' AND T1.FirstName = 'Robert' AND T1.LastName = 'King' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | How many orders have been cancelled in 2022? | cancelled refers to status_value = 'Cancelled'; in 2022 refers to SUBSTR(status_date, 1, 4) = '2022' | SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Cancelled' AND STRFTIME('%Y', T2.status_date) = '2022' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
chicago_crime | Please list the precise location coordinates of all the crimes in Central Chicago. | location coordinates refers to latitude, longitude; Central Chicago refers to district_name = 'Central' | SELECT T2.latitude, T2.longitude FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.district_name = 'Central' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Provide the number of orders that were handled by Michael Suyama. | null | SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Michael' AND T1.LastName = 'Suyama' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | Identify the publisher of the book Girls' Night In. | "Girls' Night In" is the title of the book; publisher is the publisher_name | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'Girls'' Night In' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
app_store | For the Honkai Impact 3rd App, what is the highest sentiment polarity score and what genre does it belong to? | highest sentiment polarity score refers to MAX(Sentiment_Polarity); | SELECT MAX(T2.Sentiment_Polarity), T1.Genres FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Honkai Impact 3rd' AND T2.Sentiment_Polarity > 0.5 GROUP BY T1.Genres | CREATE TABLE playstore
(
Rating REAL, --
Size TEXT, --
App TEXT, --
Category TEXT, --
Price TEXT, --
"Content Rating" TEXT, -- Example Values: `Everyone`, `Teen`, `Everyone 10+`, `Mature 17+`, `Adults only 18+` | Value Statics: Total count 10840 - Distinct count 6 - Null count 0
Installs TEXT, --
... |
chicago_crime | Please list the names of all the neighborhoods in Central Chicago. | name of neighborhood refers to neighborhood_name; Central Chicago refers to side = 'Central' | SELECT T2.neighborhood_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.side = 'Central' | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Who is the newest hired employee? Give the full name. | newest hired refers to latest HireDate; full name = FirstName, LastName; | SELECT FirstName, LastName FROM Employees WHERE HireDate = ( SELECT MAX(HireDate) FROM Employees ) | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | Identify the cost difference between Priority and Express shipping methods. | "Priority" and "Express" are both method_name; cost difference = Subtract (Sum(cost where method_name = 'Express'), Sum(cost where method_name 'Priority')) | SELECT SUM(CASE WHEN method_name = 'Priority' THEN cost ELSE 0 END) - SUM(CASE WHEN method_name = 'Express' THEN cost ELSE 0 END) FROM shipping_method | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
genes | How many non-essential genes are located in the nucleus? | null | SELECT COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Classification AS T2 ON T1.GeneID = T2.GeneID WHERE T2.Localization = 'nucleus' AND T1.Essential = 'Non-Essential' | CREATE TABLE Interactions
(
foreign key (GeneID1) references Classification (GeneID) on update cascade on delete cascade,
primary key (GeneID1, GeneID2),
foreign key (GeneID2) references Classification (GeneID) on update cascade on delete cascade,
GeneID2 TEXT not null, --
GeneID1 TEXT not null, --
Expression... |
chicago_crime | Please list the names of all the neighborhoods in the community area with the most population. | name of neighborhood refers to neighborhood_name; the most population refers to max(population) | SELECT T1.neighborhood_name FROM Neighborhood AS T1 INNER JOIN Community_Area AS T2 ON T2.community_area_no = T2.community_area_no ORDER BY T2.population DESC LIMIT 1 | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Give the full name of the youngest employee. | full name = FirstName, LastName; youngest refers to latest BirthDate; | SELECT FirstName, LastName FROM Employees WHERE BirthDate = ( SELECT MAX(BirthDate) FROM Employees ) | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
chicago_crime | How many neighborhoods are there in the community area of Lincoln Square? | the community area of Lincoln Square refers to community_area_name = 'Lincoln Square' | SELECT COUNT(T3.community_area_no) FROM ( SELECT T1.community_area_no FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no WHERE community_area_name = 'Lincoln Square' GROUP BY T1.community_area_no ) T3 | CREATE TABLE District
(
district_no INTEGER primary key,
email TEXT, --
phone TEXT, --
address TEXT, --
fax TEXT, --
district_name TEXT, --
tty TEXT, --
commander TEXT, --
zip_code INTEGER, --
twitter TEXT, --
);
CREATE TABLE Community_Area
(
population TEXT, --
side TEXT, -- Example Va... |
retail_world | Among the products ordered in order no. 10248, which product has the biggest ratio of units on order to units in stock? | order no. refers to OrderID; biggest ratio = MAX(DIVIDE(UnitsOnOrder, UnitsInStock)); | SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.UnitsOnOrder / T1.UnitsInStock DESC LIMIT 1 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
books | List all the books published by BBC Audiobooks. | "BBC Audiobooks" refers to publisher_name; books refers to title | SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'BBC Audiobooks' | CREATE TABLE order_line
(
book_id INTEGER references book, --
price REAL, --
line_id INTEGER primary key autoincrement,
order_id INTEGER references cust_order, --
);
CREATE TABLE customer
(
customer_id INTEGER primary key,
first_name TEXT, --
last_name TEXT, --
email TEXT, --
);
CREATE TABLE book_... |
menu | Name the dishes that cost 180,000. | cost 180,000 refers to price = 180000; | SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.price = 180000 | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
public_review_platform | State the state of businesses which have closing time at 12AM. | state refers to city | SELECT DISTINCT T1.state FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T2.closing_time = '12AM' | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
soccer_2016 | What are the names of the venues in Abu Dhabi? | names of the venues refers to Venue_Name; Abu Dhabi refers to City_Name = 'Abu Dhabi' | SELECT T1.Venue_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_Id = T2.City_Id WHERE T2.City_Name = 'Abu Dhabi' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
menu | How many dishes appeared more than once on a menu? | appeared more than once on a menu refers to times_appeared > menus_appeared; | SELECT COUNT(*) FROM Dish WHERE times_appeared > Dish.menus_appeared | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
public_review_platform | Calculate the percentage of medium tip length in the list. List out the time when users of medium tip length join Yelp. | medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year | SELECT CAST(SUM(CASE WHEN T1.tip_length = 'Medium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.tip_length), T2.user_yelping_since_year FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
menu | List down name of dishes from menu with menu page ID 1389. | FALSE; | SELECT T2.name FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T1.menu_page_id = 1389 | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
public_review_platform | Which business ID has the most reviews? | the most reviews refer to MAX(user_id); | SELECT business_id FROM Reviews GROUP BY business_id ORDER BY COUNT(user_id) DESC LIMIT 1 | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
soccer_2016 | How many matches did Rajasthan Royals play in Season 8? | Season 8 refers to Season_Id = 8 | SELECT SUM(CASE WHEN T1.Season_Id = 8 THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T1.Team_1 = T2.Team_Id OR T1.Team_2 = T2.Team_Id WHERE T2.Team_Name = 'Rajasthan Royals' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
public_review_platform | Calculate the percentage of businesses who located in Mesa. What is attribute value of these businesses. | percentage = divide(count(business where city = 'Mesa'), count(business)) * 100% | SELECT CAST(COUNT(T1.city) AS REAL) * 100 / ( SELECT COUNT(business_id) FROM Business ), T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Mesa' | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
soccer_2016 | Which country is umpire TH Wijewardene from? | country refers to Country_Name | SELECT T2.Country_Name FROM Umpire AS T1 INNER JOIN country AS T2 ON T2.Country_Id = T1.Umpire_Country WHERE T1.Umpire_Name = 'TH Wijewardene' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
menu | Which dish has the longest history? | longest history refers to MAX(SUBTRACT(last_appeared, first_appeared)); | SELECT name FROM Dish ORDER BY last_appeared - Dish.first_appeared DESC LIMIT 1 | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
menu | How many dishes have appeared on the menu in less than 5 years? | appeared on the menu in less than 5 years = SUBTRACT(last_appeared, first_appeared) < 5; | SELECT COUNT(*) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.last_appeared - T1.first_appeared < 5 | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
public_review_platform | Among the users who received high compliments from other users, which users joined Yelp earliest? | high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year) | SELECT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T2.number_of_compliments = 'High' AND T1.user_yelping_since_year = ( SELECT MIN(user_yelping_since_year) FROM Users ) | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
soccer_2016 | List all the names of the winning team's players in the first match of season 1. | names refers to Player_Name; winning team's refers to Match_Winner; first match of season 1 refers to Season_Id = 1 and min(Match_Date) | SELECT T3.Player_Name FROM `Match` AS T1 INNER JOIN Player_Match AS T2 ON T1.Match_Winner = T2.Team_Id INNER JOIN Player AS T3 ON T2.Player_Id = T3.Player_Id WHERE T1.Season_Id = 1 ORDER BY T1.Match_Date LIMIT 1 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
menu | How many menus sponsored by Krogs Fiske Restaurant were created in April 2015? | sponsored by Krogs Fiske Restaurant refers to sponsor = 'Krogs Fiskerestaurant'; created in April 2015 refers to date like '2015-04%'; | SELECT COUNT(*) FROM Menu WHERE date LIKE '2015-04%' AND sponsor = 'Krogs Fiskerestaurant' | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
public_review_platform | How many 5 star businesses have uber review votes for funny? | businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber'; | SELECT COUNT(business_id) FROM Reviews WHERE review_stars = 5 AND review_votes_funny = 'Uber' | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
menu | How long has the "Clear Green Turtle" dish appeared on the menu, and tell me when its latest update was? | Clear Green Turtle is a name of dish; how long a dish appeared on the menu = SUBTRACT(last_appeared, first_appeared); latest update refers to latest updated_at; | SELECT T1.last_appeared - T1.first_appeared, T2.updated_at FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Clear green turtle' | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
public_review_platform | Among the businesses which have attribute of beer_and_wine, how many business located in Peoria? | attribute of beer_and_wine refers to attribute_value = 'beer_and_wine'; in Peoria refers to city = 'Peoria' | SELECT COUNT(T1.business_id) FROM Business_Attributes AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.city = 'Peoria' AND T1.attribute_value = 'beer_and_wine' | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
soccer_2016 | How many players bowl in the legbreak style? | legbreak style refers to Bowling_skill = 'Legbreak' | SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_skill = 'Legbreak' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
public_review_platform | Which year has the most elite users? | year has the most elite users refers to year_id with MAX(user_id); | SELECT year_id FROM Elite GROUP BY year_id ORDER BY COUNT(user_id) DESC LIMIT 1 | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
menu | How many pages are there in the "Emil Kuehn" menu? | Emil Kuehn is a name of menu; | SELECT SUM(CASE WHEN T1.name = 'Emil Kuehn' THEN 1 ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
soccer_2016 | Provide the complete name of the venue, city and country where the last match was held. | name of the venue, city and country refers to Venue_Name and City_Name and Country_Name; last match refers to max(Match_Date) | SELECT T1.Venue_Name, T2.City_Name, T3.Country_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_Id = T2.City_Id INNER JOIN Country AS T3 ON T2.Country_Id = T3.Country_Id INNER JOIN Match AS T4 ON T1.Venue_Id = T4.Venue_Id ORDER BY T4.Match_Date DESC LIMIT 1 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
menu | How many dishes appear in the right upper corner of the menu page? | appear in the right upper corner of the menu page refers to xpos > 0.75 and ypos < 0.25; | SELECT COUNT(*) FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T1.dish_id = T2.id WHERE T1.xpos > 0.75 AND T1.ypos < 0.25 | CREATE TABLE Dish
(
menus_appeared INTEGER, --
highest_price REAL, --
description TEXT, -- Example Values: `` | Value Statics: Total count 7 - Distinct count 1 - Null count 99993
last_appeared INTEGER, --
name TEXT, --
id INTEGER primary key,
first_appeared INTEGER, --
lowest_price REAL, --
time... |
public_review_platform | Which business ID have the shortest business operating hours? | the shortest business operating hours refer to MIN(SUBTRACT(closing_time, opening_time)); | SELECT business_id FROM Business_Hours ORDER BY closing_time - opening_time LIMIT 1 | CREATE TABLE Attributes
(
attribute_name TEXT, --
attribute_id INTEGER constraint Attributes_pk primary key,
);
CREATE TABLE Elite
(
year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 ... |
soccer_2016 | Which country is the youngest player from? | country refers to Country_Name; youngest player refers to max(DOB) | SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T1.Country_Id = T2.Country_Name ORDER BY T2.DOB DESC LIMIT 1 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.