db_id stringclasses 66
values | question stringlengths 24 325 | evidence stringlengths 1 673 ⌀ | gold_query stringlengths 23 804 | db_schema stringclasses 66
values |
|---|---|---|---|---|
retail_world | List out the full name of employee who has birth day on "3/4/1955 12:00:00 AM". | full name refers to FirstName, LastName; brith day refers to BirthDate | SELECT FirstName, LastName FROM Employees WHERE BirthDate = '1955-03-04 00:00:00' | 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... |
address | List all the cities with micro CBSA. | micro CBSA refers to CBSA_type = 'Micro'; | SELECT T2.city FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_type = 'Micro' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | How many solutions whose repository's stars are a third more than forks? | solutions refers to Solution.Id; repository stars are a third more than forks = (MULTIPLY(Stars, 1/3))>Forks; | SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks < T1.Stars * 1 / 3 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | On image no. 99 identify the percentage of objects that are described as white. | image no. 99 refers to IMG_ID = 99; described as white refers to ATT_CLASS = 'white'; percentage = divide(count(OBJ_SAMPLE_ID) where ATT_CLASS = 'white', count(OBJ_SAMPLE_ID)) as percentage | SELECT CAST(SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(OBJ_SAMPLE_ID) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 99 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What is the title of Michael Suyama? | null | SELECT Title FROM Employees WHERE FirstName = 'Michael' AND 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... |
codebase_comments | What is the percentage of solutions for the method that needs to be compiled in the English methods? | method that needs to be compiled refers to WasCompiled = 0; English method refers to Lang = 'en'; percentage of solutions = MULTIPLY(DIVIDE(SUM(WasCompiled = 0), COUNT(Solution.Id)), 100); | SELECT CAST(SUM(CASE WHEN T1.WasCompiled = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Lang) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'en' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Define the bounding box of the object sample no. 7 on image no. 42. | bounding box of the object refers to (X, Y, W, H); sample no.7 on image no.42 refers to IMG_ID = 42 and OBJ_SAMPLE_ID = 7 | SELECT X, Y, W, H FROM IMG_OBJ WHERE IMG_ID = 42 AND OBJ_SAMPLE_ID = 7 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many customers are located in London? | London refers to City = 'London' | SELECT COUNT(CustomerID) FROM Customers WHERE City = 'London' | 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... |
address | What is the zip code of the district represented by Steven A King? | null | SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.first_name = 'King' AND T1.last_name = 'Steven A' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | How many stars does the repository of the solution No. 45997 have? | repository of solution no. refers to Id | SELECT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 45997 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | On image no. 20, identify the attribute ID that is composed of the highest number of objects. | image no. 20 refers to IMG_ID = 20; attribute ID refers to ATT_CLASS_ID; highest number of objects refers to max(count(ATT_CLASS_ID)) | SELECT ATT_CLASS_ID FROM IMG_OBJ_ATT WHERE IMG_ID = 20 GROUP BY ATT_CLASS_ID ORDER BY COUNT(ATT_CLASS_ID) DESC LIMIT 1 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Name the shipper which had the most shipments in first quarter of 1998. | Name the shipper refers to CompanyName; most shipments refers to max(count(OrderID)); first quarter of 1998 refers to ShippedDate = 1998/1 and ShippedDate = 1998/2 and ShippedDate = 1998/3 and ShippedDate = 1998/4 | SELECT T1.CompanyName FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia WHERE STRFTIME('%Y', T2.ShippedDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) 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... |
image_and_language | How many object elements can be detected on image no. 31? | How many object elements refers to OBJ_CLASS_ID; image no. 31 refers to IMG_ID = 31 | SELECT COUNT(OBJ_CLASS_ID) FROM IMG_OBJ WHERE IMG_ID = 31 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Among the product lists in order ID 10337, write down the product names and suppliers which had the highest in reorder level. | suppliers refers to CompanyName; highest in reorder level refers to Max(ReorderLevel) | SELECT T2.ProductName, T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID WHERE T3.OrderID = 10337 ORDER BY T2.ReorderLevel 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... |
codebase_comments | What is the task of method number 2? | task of the method refers to the second part of the Name after the "."; method number refers to Method_100k.Id; Method_100k.Id = 2; | SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE Id = 2 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many attributes are related to the object sample no. 7 on image no. 4? | How many attributes refers to ATT_CLASS_ID; object sample no. 7 on image no. 4 refers to IMG_ID = 4 and OBJ_SAMPLE_ID = 7 | SELECT COUNT(ATT_CLASS_ID) FROM IMG_OBJ_ATT WHERE IMG_ID = 4 AND OBJ_SAMPLE_ID = 7 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | List down the company names which supplied products for the order on 14th August, 1996. | products refers to Order_Details.ProductID; on 14th August, 1996 refers to OrderDate = '8/14/1996' | SELECT T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID INNER JOIN Orders AS T4 ON T3.OrderID = T4.OrderID WHERE date(T4.OrderDate) = '1996-08-14' | 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... |
address | What is the average household income in the city known as "Danzig"? | average household income refers to avg_income_per_household; city known as "Danzig" refers to bad_alias = 'Danzig'; | SELECT T2.avg_income_per_household FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Danzig' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Among the repository "3", how many methods whose comments is XML format? | repository refers to RepoId; RepoId = 3; method refers to Name; method whose comment is XML format refers to CommentIsXml = 1; | SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 3 AND T2.CommentIsXml = 1 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What is the relationship between object sample no. 25 and object sample no. 2 on image no. 1? | relationship refers to PRED_CLASS; object sample no. 25 and object sample no. 2 refers to OBJ1_SAMPLE_ID = 25 and OBJ2_SAMPLE_ID = 2; image no. 1 refers to IMG_ID = 1 | SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 1 AND T1.OBJ1_SAMPLE_ID = 25 AND T1.OBJ2_SAMPLE_ID = 2 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Calculate the total payment of orders for Vegie-spread product. | Vegie-spread product refers to ProductName = 'Vegie-spread';total payment = MULTIPLY(UnitPrice, Quantity, (1-Discount)) | SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) AS sum FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Vegie-spread' | 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... |
codebase_comments | Please provide a link to the most well-known repository's Github address. | link refers to Url; well-known repository refers to MAX(Watchers); | SELECT Url FROM Repo WHERE Watchers = ( SELECT MAX(Watchers) FROM Repo ) | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Describe the objects, their attributes, and the relationships that comprise the scene on image no. 1 within the bounding box, represented as (388, 369, 48, 128). | objects refers to OBJ_CLASS; attributes refers to ATT_CLASS; relationships refers to PRED_CLASS; image no. 1 refers to IMG_ID = 1; bounding box, represented as (388, 369, 48, 128) refers to X = 388 and Y = 369 and W = 48 and H = 128 | SELECT DISTINCT T2.OBJ_CLASS, T4.ATT_CLASS, T6.PRED_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID INNER JOIN IMG_REL AS T5 ON T1.IMG_ID = T5.IMG_ID INNER J... | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Describe Sales Representative names who were hired in 1992 and compare the number of orders among them. | Sales Representative refers to Title = 'Sales Representative';were hired in 1992 refers to HireDate = '1992' | SELECT T1.FirstName, T1.LastName, COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Title = 'Sales Representative' AND STRFTIME('%Y', T1.HireDate) = '1992' GROUP BY T1.EmployeeID, T1.FirstName, T1.LastName | 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... |
address | Name the county that has the bad alias of Druid Hills. | "Druid Hills" is the bad_alias | SELECT T2.county FROM avoid AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Druid Hills' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | How many solutions are there whose respositories received the number of stars more than one third of the number of forks? | number of solutions are there whose repositories received the number of stars more than one third of the number of forks refers to Stars>DIVIDE(Forks, 3); | SELECT COUNT(DISTINCT T1.Id) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars > CAST(T1.Forks AS REAL) / 3 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What colour is the van that can be spotted in image no. 1? | colour refers to ATT_CLASS; van refers to OBJ_CLASS = 'van'; image no. 1 refers to IMG_ID = 1 | SELECT T4.ATT_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID WHERE T2.OBJ_CLASS = 'van' AND T1.IMG_ID = 1 GROUP BY T4.ATT_CLASS | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | List down the territory IDs, descriptions and region description which are under the in-charge of Nancy Davolio, | descriptions refers to TerritoryDescription; region refers to RegionDescription | SELECT T3.RegionID, T3.TerritoryDescription, T4.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T1.LastName = 'Davolio' AND T1.FirstName... | 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... |
address | What is the number of households in the "FL-10" district? | null | SELECT SUM(CASE WHEN T2.district = 'FL-10' THEN 1 ELSE 0 END) FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the solution path for method number 3? | solution path refers to Path; method number refers to Method_100k.Id; Method_100k.Id = 3; | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 3 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many object elements are there on average in each image? | object elements refers to OBJ_CLASS_ID; average = divide(count(OBJ_CLASS_ID), count(IMG_ID)) | SELECT CAST(COUNT(OBJ_CLASS_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Provide employees' ID who are in-charge of territory ID from 1000 to 2000. | territory ID from 1000 to 2000 refers to TerritoryID BETWEEN 1000 and 2000 | SELECT EmployeeID FROM EmployeeTerritories WHERE TerritoryID BETWEEN 1000 AND 2000 | 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... |
address | What is the area code of the city with the largest land area? | largest land area refers to Max(land_area) | SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.land_area = ( SELECT MAX(land_area) FROM zip_data ) | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What format does the method number 8's comment have? | format refers CommentIsXml; method number refers to Method_100k.Id; Method_100k.Id = 8; | SELECT CASE WHEN CommentIsXml = 0 THEN 'isNotXMLFormat' WHEN CommentIsXml = 1 THEN 'isXMLFormat' END format FROM Method WHERE Id = 8 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many images contain 'bridge' as an object element? | images refers to IMG_ID; 'bridge' as an object element refers to OBJ_CLASS = 'bridge' | SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'bridge' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What is the ratio number of territories in Northern region and number territories in Western region? | Northern region refers to RegionID = 3; Western region refers to RegionID = 2 ; ratio = divide((TerritoryDescription where RegionID = 3), (TerritoryDescription where RegionID = 2)) | SELECT CAST(( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern' ) AS REAL) * 100 / ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Weste... | 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... |
address | What percentage of households are in "Coroyell" out of its state? | DIVIDE(SUM(households where county = 'CORYELL'), SUM(households)) as percentage; | SELECT CAST(SUM(CASE WHEN T1.county = 'CORYELL' THEN T2.households ELSE 0 END) AS REAL) * 100 / SUM(T2.households) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is solution 1's processing time and how many methods have been using this solution? | solution refers to Solution.Id and SolutionId; Solution.Id = 1; SolutionId = 1; processing time refers to ProcessedTime; methods refers to Name; | SELECT T1.ProcessedTime, COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.SolutionId = 1 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Name the object element that is described as being scattered on image no. 10. | Name the object element refers to OBJ_CLASS; scattered refers to ATT_CLASS = 'scattered'; image no. 10 refers to IMG_ID = 10 | SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID WHERE T4.ATT_CLASS = 'scattered' AND T1.IMG_ID = 10 GROUP BY T2.OBJ_CLASS | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many orders were handled by Michael Suyama. State the order ID. | 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... |
address | Give the area code of the city with the white population ranging between 1700 to 2000. | null | SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.white_population BETWEEN 1700 AND 2000 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the task of the method that is in the Czech language? | method refers to Name; task of the method refers to the second part of the Name after the "."; Czech language refers to Lang = 'cs' | SELECT DISTINCT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE Lang = 'cs' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What attributes are used to describe the wall on image no. 27. | What attributes refers to ATT_CLASS; wall on image no. 27 refers to OBJ_CLASS = 'wall' and IMG_ID = 27 | SELECT T4.ATT_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID WHERE T2.OBJ_CLASS = 'wall' AND T1.IMG_ID = 27 GROUP BY T4.ATT_CLASS | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | State the name of all territories in Northern region. | name of all territories refers to TerritoryDescription; Northern region refers to RegionDescription = 'Northern' | SELECT DISTINCT T1.TerritoryDescription 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... |
address | What are the states with an above-average female population? | above-average female population refers to female_population > DIVIDE(SUM(female_population), COUNT(state)); | SELECT DISTINCT T2.state FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T2.female_population > ( SELECT AVG(female_population) FROM zip_data ) | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the language of method number 28 that can be found in the repository number 3? | language of method refers to Lang; method number refers to Method_100k.Id; Method_100k.Id = 28; repository number refers to RepoId; RepoID = 3; | SELECT T2.Lang FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 28 AND T1.RepoId = 3 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | On image no. 5, name the attributes that are composed of multiple objects. | image no. 5 refers to IMG_ID = 5; name the attributes refers to ATT_CLASS; multiple objects refers to count(ATT_CLASS) > = 2 | SELECT T2.ATT_CLASS FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 5 GROUP BY T2.ATT_CLASS HAVING COUNT(T2.ATT_CLASS) > 2 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Who was taking charge of orders from Morristown? | Morristown refers to TerritoryDescription = 'Morristown' | 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 = 'Morristown' | 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... |
address | Indicate the country name of the city Las Marias. | null | SELECT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Las Marias' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please state the API calls for method number 10 and its intended course of action. | method number refers to Method_100k.Id; Method_100k.Id = 10; intended course of action refers to Path; | SELECT T2.ApiCalls, T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 10 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many objects can you spot in image no. 72? What objects may be identified on the same image and within the bounding box represented as (341, 27, 42, 51)? | How many objects refers to OBJ_CLASS_ID; image no. 72 refers to IMG_ID = 72; What objects refers to OBJ_CLASS; bounding box represented as (341, 27, 42, 51) refers to X = 341 and Y = 27 and W = 42 and H = 51 | SELECT SUM(IIF(T1.IMG_ID = 1, 1, 0)), SUM(IIF(T1.X = 341 AND T1.Y = 27 AND T1.W = 42 AND T1.H = 51, 1, 0)) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many orders 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... |
address | List down the area code and country of the city named Savoy. | Savoy is the city; | SELECT T1.area_code, T2.county FROM area_code AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code INNER JOIN zip_data AS T3 ON T1.zip_code = T3.zip_code WHERE T3.city = 'Savoy' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
image_and_language | Define the onion's bounding box on image no. 285930. | bounding box refers to (X, Y, W, H); onion refers to OBJ_CLASS = 'onion'; image no.285930 refers to IMG_ID = 285930 | SELECT T1.X, T1.Y, T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 285930 AND T2.OBJ_CLASS = 'onion' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | State the name of employee that manages the order from Victuailles en stock? | name of employee refers to FirstName; from Victuailles en stock refers to CompanyName = 'Victuailles en stock' | SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.CompanyName = 'Victuailles en stock' | 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... |
codebase_comments | What is the comment format of method number 50 with the solution path "managedfusion_managedfusion\ManagedFusion.sln"? | comment format refers to CommentIsXml; method number refers to Method_100k.Id; Method_100k.Id = 50; solution path refers to Path; Path = 'managedfusion_managedfusion\ManagedFusion.sln'; | SELECT CASE WHEN T2.CommentIsXml = 0 THEN 'isNotXMLFormat' WHEN T2.CommentIsXml = 1 THEN 'isXMLFormat' END format FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 50 AND T1.Path = 'managedfusion_managedfusionManagedFusion.sln' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Identify the border's coordinates on the X and Y axes that enclose a folk in image no. 6. | coordinates on the X and Y axes refers to X and Y; folk refers to OBJ_CLASS = 'folk'; image no. 6 refers to IMG_ID = 6 | SELECT T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 6 AND T2.OBJ_CLASS = 'folk' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What is the position title for Laura Callahan? | null | SELECT Title FROM Employees WHERE 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... |
address | Indicate the name of the congressman represent in Guanica. | name of congressman implies full name which refers to first_name, last_name; Guanica is the city; | SELECT T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.city = 'Guanica' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | How many methods in the same repository share a tokenized name that begins with "query language..."? | methods refers to Name; tokenized name refers to NameTokenized; NameTokenized LIKE 'query language%'; | SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized LIKE 'query language%' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Provide the dimensions of the bounding box that contains the keyboard that was spotted in image no. 3. | dimensions of the bounding box refers to (W, H); keyboard refers to OBJ_CLASS = 'keyboard'; image no. 3 refers to IMG_ID = 3 | SELECT T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 3 AND T2.OBJ_CLASS = 'keyboard' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | State the company name of all suppliers in USA. | in USA refers to Country = 'USA' | SELECT CompanyName FROM Suppliers WHERE Country = 'USA' | 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... |
codebase_comments | How many methods in repository 150 did not have a comment and a summary? | methods refers to Name; repository that did not have a comment and a summary refers to FullComment IS NULL AND Summary IS NULL; | SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 150 AND T2.FullComment IS NULL AND T2.Summary IS NULL | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What is the object class of the image with a bounding box of 0, 0, 135, 212? | object class of the image refers to OBJ_CLASS; bounding box of 0, 0, 135, 212 refers to X = 0 AND Y = 0 AND W = 135 AND H = 212 | SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.X = 0 AND T2.Y = 0 AND T2.W = 135 AND T2.H = 212 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What is the name of product with the ID of 77? | name of product refers to ProductName; ID refers to ProductID | SELECT ProductName FROM Products WHERE ProductID = 77 | 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... |
codebase_comments | What is the solution path for the method "IQ.Data.DbQueryProvider.CanBeEvaluatedLocally"? | solution path refers to Path; method refers to Name; Name = 'IQ.Data.DbQueryProvider.CanBeEvaluatedLocally' | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'IQ.Data.DbQueryProvider.CanBeEvaluatedLocally' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Among the objects that have multiple relations, how many images whose captions for the prediction class ids are "on"? | objects that have multiple relations refers to OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID; captions for the prediction class ids are "on" refers to PRED_CLASS = 'on' | SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID != T1.OBJ2_SAMPLE_ID AND T2.PRED_CLASS = 'on' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What are the most popular confections product and calculate the total sales generated by this product? | most popular confections product refers to ProductID = max(count(MULTIPLY(Quantity, UnitPrice))) from CategoryName = 'Confections' ; total sales refers to sum(MULTIPLY(Quantity, UnitPrice)) | SELECT COUNT(T1.UnitPrice * T3.Quantity) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T1.ProductID = T3.ProductID WHERE T2.CategoryName = 'Confections' GROUP BY T3.Quantity ORDER BY T3.Quantity 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... |
address | What is the name and the position of the CBSA officer in the city of Cabo Rojo? | name of the CBSA officer refers to CBSA_name; position of the CBSA officer refers to CBSA_type; | SELECT T1.CBSA_name, T1.CBSA_type FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'Cabo Rojo' GROUP BY T1.CBSA_name, T1.CBSA_type | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Provide the tokenized name of the method "Sky.Excel.ExcelBook.TypeConvert". | tokenized name refers to NameTokenized; NameTokenized = 'Sky.Excel.ExcelBook.TypeConvert'; | SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Give all the bounding boxes for image 2222 whose object classes are feathers. | bounding boxes refers to (x, y, W, H); image 2222 refers to IMG_ID = 2222; object classes are feathers refers to OBJ_CLASS = 'feathers' | SELECT T2.X, T2.Y, T2.H, T2.W FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2222 AND T1.OBJ_CLASS = 'feathers' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Which customer is a regular customer in this shop and what are the products category that he mostly buy? | regular customer refers to max(count(CustomerID)); products category refers to CategoryName; mostly buy refers to max(count(CategoryID)) | SELECT T1.CustomerID, T4.CategoryName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID INNER JOIN Categories AS T4 ON T3.CategoryID = T4.CategoryID ORDER BY T1.CustomerID DESC, T4.CategoryName DESC | 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... |
address | Provide the names of bad aliases in the city of Aguadilla. | null | SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Aguadilla' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | For the method which got the tokenized name as 'interp parser expr', what is the processed time for its solution? | tokenized name refers to NameTokenized; NameTokenized = 'interp parser expr'; processed time for its solution refers to ProcessedTime; | SELECT T1.ProcessedTime FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'interp parser expr' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What are the captions of all the self-relation relationship prediction classes? | self-relation relationship refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID and PRED_CLASS; captions of prediction classes refers to PRED_CLASS | SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN pred_classes AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID = T1.OBJ2_SAMPLE_ID GROUP BY T2.PRED_CLASS | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Which customer have the biggest purchase in one order and where does this order being ship to? | biggest purchase refers to max(ProductID.Order_Details); ship to refers to ShipCountry | SELECT T1.CompanyName, T2.ShipCountry FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID GROUP BY T1.CompanyName, T2.ShipCountry ORDER BY COUNT(T3.ProductID) 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... |
codebase_comments | How many watchers does the path "maff_se3ue7\US7.sln" have? | null | SELECT T1.Watchers FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Path = 'maff_se3ue7US7.sln' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | List all the explanations about object classes of all the images with an x and y coordinate of 0. | explanations about distinct object classes refers to OBJ_CLASS; images refers to IMG_ID; x and y coordinate of 0 refers to X = 0 AND Y = 0 | SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.X = 0 AND T2.Y = 0 GROUP BY T1.OBJ_CLASS | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many employees is a UK citizen and are they all covering the same region? | is a UK citizen refers to Country = 'UK' | SELECT COUNT(T1.EmployeeID), T3.RegionID 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.Country = 'UK' GROUP BY T3.RegionID | 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... |
address | What is the difference in the number of bad alias between Aguada city and Aguadilla city? | SUBTRACT(COUNT(bad_alias where city = 'Aguada'), COUNT(bad_alias where city = 'Aguadilla')); | SELECT COUNT(CASE WHEN T2.city = 'Aguada' THEN T1.bad_alias ELSE NULL END) - COUNT(CASE WHEN T2.city = 'Aguadilla' THEN T1.bad_alias ELSE NULL END) AS DIFFERENCE FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the task method of the tokenized name "string extensions to pascal case
"? | method refers to Name; task of the method refers to the second part of the Name after the "."; tokenized name refers to NameTokenized; NameTokenized = 'string extensions to pascal case'; | SELECT DISTINCT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'string extensions to pascal case' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many prediction classes with "has" captions are there for image id 3050? | prediction classes with "has" captions refers to PRED_CLASS = 'has'; image id 3050 refers to IMG_ID = 3050 | SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 3050 AND T2.PRED_CLASS = 'has' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many sales values have been created by sales representative and which sales representative have the highest sales? | sales representative refers to Title = 'Sales Representative'; sales values refers to MULTIPLY(Quantity, UnitPrice); the highest sales refers to max(MULTIPLY(Quantity, UnitPrice)) | SELECT SUM(T3.UnitPrice * T3.Quantity) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.Title = 'Sales Representative' ORDER BY SUM(T3.UnitPrice * T3.Quantity) | 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... |
codebase_comments | How many XML format does the github address "https://github.com/dogeth/vss2git.git" have? | Xml format refers to CommentisXml, github address refers to Url; Url = 'https://github.com/dogeth/vss2git.git'; | SELECT COUNT(T3.CommentIsXml) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId INNER JOIN Method AS T3 ON T2.Id = T3.SolutionId WHERE T1.Url = 'https://github.com/dogeth/vss2git.git' AND T3.CommentIsXml = 1 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What are the x and y coordinates of all the images with a prediction relationship class id of 98? | prediction relationship class id of 98 refers to PRED_CLASS_ID = 98 | SELECT T2.X, T2.Y FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID WHERE T1.PRED_CLASS_ID = 98 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many subordinates does employee ID 2 have and what is the biggest order in terms of value that his/her subordinates have created? | subordinates of employee ID 2 refers to EmployeeID where ReportsTo = 2; biggest order in terms of value refers to max(MULTIPLY(Quantity, UnitPrice)) | SELECT COUNT(T1.EmployeeID), SUM(T3.Quantity * T3.UnitPrice) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.ReportsTo = 2 ORDER BY SUM(T3.UnitPrice * T3.Quantity) 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... |
address | How many cities does congressman Pierluisi Pedro represent? | null | SELECT COUNT(DISTINCT T1.city) FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Pierluisi' AND T3.last_name = 'Pedro' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | How many path does the github address "https://github.com/jeffdik/tachy.git" have? | github address refers to Url; Url = 'https://github.com/jeffdik/tachy.git'; | SELECT COUNT(DISTINCT T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/jeffdik/tachy.git' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Which image has the highest number of "white" class attributes? | "white" class attributes refers to ATT_CLASS = 'white'; highest number refers to max(count(ATT_CLASS_ID)) | SELECT T1.IMG_ID AS IMGID FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.ATT_CLASS = 'white' GROUP BY T1.IMG_ID ORDER BY COUNT(T1.ATT_CLASS_ID) DESC LIMIT 1 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What are the total products value shipped to Brazil by Speedy Express Company? | shipped to Brazil refers to ShipCountry = 'Brazil'; by Speedy Express Company refers to CompanyName = 'Speedy Express'; total products value refers to sum(MULTIPLY(UnitPrice, Quantity)) | SELECT SUM(T2.Quantity * T2.UnitPrice) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Shippers AS T3 ON T1.ShipVia = T3.ShipperID WHERE T3.CompanyName = 'Speedy Express' AND T1.ShipCountry = 'Brazil' | 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... |
address | Provide the population of Arecibo in 2020. | population of Arecibo in 2020 refers to SUM(population_2020) where county = 'ARECIBO'; | SELECT SUM(T2.population_2020) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'ARECIBO' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What are the solution path of the tokenized name "matrix multiply"? | solution path refers to Path; tokenized name refers to NameTokenized; NameTokenized = 'matrix multiply'; | SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'matrix multiply' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What is the prediction relationship class id of the tallest image? | prediction relationship class id refers to PRED_CLASS_ID; tallest image refers to max(H) | SELECT T1.PRED_CLASS_ID FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID ORDER BY T2.H DESC LIMIT 1 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What is the most common product ordered by a customer from Germany? | most common product refers to max(count(ProductID)); customer from Germany refers to Country = 'Germany' | SELECT T2.ProductID FROM Customers AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.Country = 'Germany' GROUP BY T2.ProductID ORDER BY COUNT(T2.ProductID) 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... |
address | Which state has the most bad aliases? | the most bad aliases refer to MAX(COUNT(bad_alias)); | SELECT T2.state FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.state ORDER BY COUNT(T1.bad_alias) DESC LIMIT 1 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | For the repository which got '8094' Stars, how many solutions does it contain? | repository refers to Repo.Id; | SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 8094 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many images have at least 5 "black" classes? | images refers to IMG_ID; have at least 5 "black" classes refers to count(ATT_CLASS_ID) where ATT_CLASS = 'black' > = 5 | SELECT COUNT(IMGID) FROM ( SELECT T1.IMG_ID AS IMGID FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.ATT_CLASS = 'black' GROUP BY T1.IMG_ID HAVING COUNT(T1.ATT_CLASS_ID) >= 5 ) T3 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Which employee has created the least order and please indicates the employee's title? | least order refers to Min(OrderID) | SELECT T1.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.Title ORDER BY COUNT(T2.OrderID) 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... |
image_and_language | What is the bounding box of the object with image id 4 and a prediction relationship class id of 144? | bounding box of the object refers to (x, y, W, H); image id refers to IMG_ID; prediction relationship class id of 144 refers to PRED_CLASS_ID = 144 | SELECT T2.X, T2.Y, T2.W, T2.H FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID WHERE T1.PRED_CLASS_ID = 144 AND T1.IMG_ID = 3 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What product have the highest unit price and how many quantity have been being sold? | product refers to ProductID; highest unit price refers to Max(UnitPrice) | SELECT T1.ProductName, T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.UnitPrice 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.