db_id stringclasses 69
values | schema stringclasses 69
values | m_schema stringclasses 69
values | question stringlengths 24 325 | sql stringlengths 23 804 | evidence stringlengths 0 673 |
|---|---|---|---|---|---|
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please list the top 3 discounts with the highest discount percentage and fall under the reseller category. | SELECT Description, DiscountPct FROM SpecialOffer WHERE Category = 'Reseller' ORDER BY DiscountPct DESC LIMIT 0, 3 | discount percentage refers to DiscountPct; highest discount percentage refers to MAX(DiscountPct); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Where can I get the demographic information about the Valley Bicycle Specialists store? | SELECT Demographics FROM Store WHERE Name = 'Valley Bicycle Specialists' | Valley Bicycle Specialists is a name of a store; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Among all the products that are manufactured in-house, how many of them are salable? | SELECT SUM(FinishedGoodsFlag) FROM Product WHERE MakeFlag = 1 | product is mnanufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the minimum inventory quantity of Chainring Bolts? | SELECT SafetyStockLevel FROM Product WHERE Name = 'Chainring Bolts' | minimum inventory quantity refers to SafetyStockLevel; chainring bolts is a name of product; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Which product has the highest standard cost? | SELECT Name FROM Product ORDER BY StandardCost DESC LIMIT 1 | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What type of employee is David Bradley? | SELECT PersonType FROM Person WHERE FirstName = 'David' AND LastName = 'Bradley' | type of employee refers to PersonType; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Among the employees who are store contacts, how many of them have a title of "Mr."? | SELECT COUNT(BusinessEntityID) FROM Person WHERE PersonType = 'SC' AND Title = 'Mr.' | store contact refers to PersonType = 'SC'; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Where can I find the Valley Bicycle Specialists store? | SELECT T2.AddressLine1, T2.AddressLine2 FROM BusinessEntityAddress AS T1 INNER JOIN Address AS T2 ON T1.AddressID = T2.AddressID INNER JOIN Store AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.Name = 'Valley Bicycle Specialists' | Valley Bicycle Specialists is a name of store; full address = AddressLine1+AddressLine2; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | To which e-mail address should I write if I want to contact David Bradley? | SELECT T2.EmailAddress FROM Person AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley' | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please list the phone numbers of all the store contacts. | SELECT T2.PhoneNumber FROM Person AS T1 INNER JOIN PersonPhone AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'SC' | store contact refers to PersonType = 'SC'; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the hashed password of David Bradley? | SELECT T2.PasswordHash FROM Person AS T1 INNER JOIN Password AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley' | hashed password refers to PasswordHash; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please list the e-mail addresses of all the employees who wish to receive e-mail promotions from Adventureworks and selected partners. | SELECT T2.EmailAddress FROM Person AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.EmailPromotion = 2 | employees who wish to receive e-mail promotions from AdventureWorks and selected partners refers to EmailPromotion = 2; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please show the credit card number of David Bradley. | SELECT T3.CardNumber FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley' | credit card number refers to CardNumber; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | In which year will the David Bradley's credit card expire? | SELECT T3.ExpYear FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley' | year of credit card expiration refers to ExpYear; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please list the names of all the store contact employees whose credit cards expired in 2007. | SELECT T1.FirstName, T1.LastName FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T3.ExpYear = 2007 AND T1.PersonType = 'SC' | year of credit card expiration refers to ExpYear; ExpYear = 2007; store contact refers to PersonType = 'SC'; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Among the store contact employees, how many of them have a Vista credit card? | SELECT COUNT(T1.FirstName) FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T3.CardType = 'Vista' AND T1.PersonType = 'SC' | store contact refers to PersonType = 'SC'; type of credit card refers to CardType; CardType = 'vista'; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many departments have David Bradley been in? | SELECT COUNT(T3.DepartmentID) FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley' | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please list the departments that David Bradley used to belong to. | SELECT T2.DepartmentID FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley' | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many people were there in the Engineering Department in the year 2009? | SELECT COUNT(T1.BusinessEntityID) FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T3.Name = 'Engineering' AND STRFTIME('%Y', T2.EndDate) > '2009' AND STRFTIME('%Y', T2.StartDate) < '2009' | year(EndDate)>2009 and year(StartDate)<2009; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Which employee has been in the Engineering Department the longest? Please give his or her firstname and lastname. | SELECT T1.FirstName, T1.LastName FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T3.Name = 'Engineering' ORDER BY T2.EndDate - T2.StartDate DESC LIMIT 1 | length of stay in a department = SUBTRACT(EndDate, StartDate); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Among the employees in the Manufacturing group in 2007, how many of them are store contacts? | SELECT COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN Person AS T3 ON T1.BusinessEntityID WHERE T3.PersonType = 'SC' AND T2.GroupName = 'Manufacturing' AND STRFTIME('%Y', T1.EndDate) >= '2007' AND STRFTIME('%Y', T1.StartDate) <... | store contact refers to PersonType = 'SC'; year(EndDate)>2007 and year(StartDate)<2007; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please list the credit card numbers of all the employees who have left the Finance Department. | SELECT T3.CardNumber FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN CreditCard AS T3 ON T1.ModifiedDate = T3.ModifiedDate INNER JOIN PersonCreditCard AS T4 ON T3.CreditCardID = T4.CreditCardID WHERE T2.Name = 'Finance' AND T1.EndDate IS NOT NULL | credit card number refers to CardNumber; employees who left the department refers to EndDate NOT null; Engineering Department is a name of department; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many employees working in the Engineering Department in 2007 would have their credit cards expired in the same year? | SELECT COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN PersonCreditCard AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID INNER JOIN CreditCard AS T4 ON T3.CreditCardID = T4.CreditCardID WHERE T4.ExpYear = 2007 AND T2.Name = 'E... | year(StartDate) 2007; year of credit card expiration refers to ExpYear; ExpYear = 2007; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the e-mail address of the employee who switched departments for the most times? | SELECT T2.EmailAddress FROM EmployeeDepartmentHistory AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID GROUP BY T2.BusinessEntityID ORDER BY COUNT(T1.DepartmentID) DESC LIMIT 1 | switched department the most refers to MAX(count(DepartmentID)); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Among all the employees who don't wish to receive promotion e-mails, how many of them belong to or once belonged to the Engineering Department? | SELECT COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T1.DepartmentID = T3.DepartmentID WHERE T3.Name = 'Engineering' AND T2.EmailPromotion = 0 | Employees who don't wish to receive e-mail promotions refers to EmailPromotion = 0; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many employees came into the Quality Assurance Group in the year 2007? | SELECT COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID WHERE T2.GroupName = 'Quality Assurance' AND STRFTIME('%Y', T1.StartDate) = '2007' | Quality Assurance Group is a group name of department; came in 2007 refers to year(StartDate) = 2007; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please list the product names of all the products on the LL Road Frame Sale. | SELECT T3.Name FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID INNER JOIN Product AS T3 ON T2.ProductID = T3.ProductID WHERE T1.Description = 'LL Road Frame Sale' | LL Road Frame Sale is a description of special offer |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many products were on the LL Road Frame Sale? | SELECT COUNT(DISTINCT ProductID) FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID WHERE T1.Description = 'LL Road Frame Sale' | LL Road Frame Sale is a description of special offer |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Has the product Chainring Bolts been on any of the sales? | SELECT CASE WHEN COUNT(T1.Description) >= 1 THEN 'Yes' ELSE 'No' END FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID INNER JOIN Product AS T3 ON T2.ProductID = T3.ProductID WHERE T3.Name = 'Chainring Bolts' | a product that's been on sale refers to SellStartDate NOT null and vice versa; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many products from the Clothing category were on the LL Road Frame Sale? | SELECT COUNT(T2.ProductID) FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID INNER JOIN Product AS T3 ON T2.ProductID = T3.ProductID INNER JOIN ProductSubcategory AS T4 ON T3.ProductSubcategoryID = T4.ProductSubcategoryID INNER JOIN ProductCategory AS T5 ON T4.Product... | LL Road Frame Sale is a description of special offer |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Please list the products that are under the Clothing category that are manufactured in-house and salable. | SELECT CASE WHEN T1.MakeFlag = 1 THEN T1.Name END FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID INNER JOIN ProductCategory AS T3 ON T2.ProductCategoryID = T3.ProductCategoryID WHERE T2.ProductSubcategoryID = 3 | product is manufactured in-house refers to MakeFlag = 1; salable product refers to FinishedGoodsFlag = 1; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | For all the employees that have left the Engineering Department, what is the average time of their stay? | SELECT CAST(SUM(365 * (STRFTIME('%Y', T1.EndDate) - STRFTIME('%Y', T1.StartDate)) + 30 * (STRFTIME('%m', T1.EndDate) - STRFTIME('%m', T1.StartDate)) + STRFTIME('%d', T1.EndDate) - STRFTIME('%d', T1.StartDate)) AS REAL) / COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.D... | employees who left a department refers to EndDate NOT null; average stay = AVG(SUBTRACT(year(EndDate)), (year(T1.StartDate))); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the average pay rate of the employees who worked in the Engineering Departmentin 2007? | SELECT AVG(T3.Rate) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN EmployeePayHistory AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T2.Name = 'Engineering' AND STRFTIME('%Y', EndDate) > '2007' AND STRFTIME('%Y', T1.StartDate) < '2007' | average pay rate = AVG(Rate); work in 2007 refers to year(StartDate)<2007 AND year(EndDate)>2007; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How much more expensive in percentage is the product with the highest selling price from the product with the lowest selling price in the Clothing category? | SELECT (MAX(T1.ListPrice) - MIN(T1.ListPrice)) * 100 / MIN(T1.ListPrice) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID INNER JOIN ProductCategory AS T3 ON T2.ProductCategoryID = T3.ProductCategoryID WHERE T3.Name = 'Clothing' | selling price refers to ListPrice; highest selling price refers to MAX(ListPrice); lowest selling price refers to MIN(ListPrice); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the average profit of all the products from the Clothing category? | SELECT SUM(T1.ListPrice - T1.StandardCost) / COUNT(T1.ProductID) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID INNER JOIN ProductCategory AS T3 ON T2.ProductCategoryID = T3.ProductCategoryID WHERE T3.Name = 'Clothing' | average profit = DIVIDE(SUM(SUBTRACT(ListPrice, StandardCost))), (COUNT(ProductSubcategoryID)))); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Which product cost the least in 2013? | SELECT ProductID FROM ProductCostHistory WHERE StartDate LIKE '2013%' ORDER BY StandardCost LIMIT 1 | cost refers to StandardCost; cost the least refers to MIN(StandardCost); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | List all products with the color yellow. | SELECT ProductID FROM Product WHERE Color = 'Yellow' | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the bussiness id for Mr. Hung-Fu Ting? | SELECT BusinessEntityID FROM Person WHERE Title = 'Mr.' AND FirstName = 'Hung-Fu' AND LastName = 'Ting' | business id refers to BusinessEntityID; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the phone number of the person with id "12597"? | SELECT PhoneNumber FROM PersonPhone WHERE BusinessEntityID = 12597 | person with id refers to BusinessEntityID; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the price for the product with the id "912"? | SELECT ListPrice FROM ProductListPriceHistory WHERE ProductID = 912 | price refers to ListPrice; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Is there a work order where the planned cost is different from the actual cost? | SELECT CASE WHEN ActualCost = PlannedCost THEN 'No' ELSE 'Yes' END FROM WorkOrderRouting | planned cost is different from actual cost refers to ActualCost ! = PlannedCost; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the thumbnail photo file for the product with the id "979"? | SELECT T2.ThumbnailPhotoFileName FROM ProductProductPhoto AS T1 INNER JOIN ProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T1.ProductID = 979 | thumbnail photo file refers to ThumbnailPhotoFileName; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | List all the names of the products with the price of more than 1000$. | SELECT DISTINCT T2.Name FROM ProductListPriceHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ListPrice > 1000 | ListPrice>1000; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the product with the most profit? | SELECT T1.ProductID FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.ListPrice - T2.StandardCost DESC LIMIT 1 | profit = SUBTRACT(ListPrice, StandardCost); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the name of the product stored in location 1 compartment L container 6? | SELECT T2.Name FROM ProductInventory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.LocationID = 1 AND T1.Shelf = 'L' AND T1.Bin = 6 | compartment refers to Shelf; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What are locations of the work order "35493"? | SELECT T2.Name FROM WorkOrderRouting AS T1 INNER JOIN Location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.WorkOrderID = 35493 | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What are the products with a large photo? | SELECT T2.ProductID FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T1.LargePhotoFileName LIKE '%large.gif' | product with large photo refers to LargePhoto NOT null; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | List all the socks products. | SELECT T2.ProductID FROM ProductSubcategory AS T1 INNER JOIN Product AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID WHERE T1.Name = 'Socks' | Socks is a name of product subcategory |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | With 100$, how many Cable Lock can you buy? | SELECT 100 / T2.ListPrice FROM Product AS T1 INNER JOIN ProductListPriceHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Cable Lock' | number of products a $100 can buy = DIVIDE(100, ListPrice); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the scrap reason for work order "57788"? | SELECT T2.Name FROM WorkOrder AS T1 INNER JOIN ScrapReason AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.WorkOrderID = 57788 | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the cost for the sports? | SELECT T2.StandardCost FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE '%Sport%' | cost refers to StandardCost; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many products with the id "476" are stored in Metal Storage? | SELECT T2.Quantity FROM Location AS T1 INNER JOIN ProductInventory AS T2 ON T1.LocationID = T2.LocationID WHERE T2.ProductID = 476 AND T1.Name = 'Metal Storage' | Metal Storage is name of location |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | List all the products with lower than average cost. | SELECT DISTINCT T2.ProductID FROM ProductCostHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.StandardCost < ( SELECT SUM(StandardCost) / COUNT(ProductID) FROM Product ) | cost refers to StandardCost; lower than average cost = StandardCost<(AVG(StandardCost)); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the the percentage of profit for the product "858"? | SELECT (T1.ListPrice - T2.StandardCost) * 100 / T2.StandardCost FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 858 | percentage of profit = DIVIDE(SUBTRACT(ListPrice, StandardCost), (StandardCost)) as percentage; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many products with a thumpnail photo? | SELECT COUNT(ProductID) FROM ProductProductPhoto WHERE ProductPhotoID != 1 | products with a thumbnail photo refers to ProductPhotoID ! = 1 ; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many days did it take to end the work order "425"? | SELECT 365 * (STRFTIME('%Y', ActualEndDate) - STRFTIME('%Y', ActualStartDate)) + 30 * (STRFTIME('%m', ActualEndDate) - STRFTIME('%m', ActualStartDate)) + STRFTIME('%d', ActualEndDate) - STRFTIME('%d', ActualStartDate) FROM WorkOrderRouting WHERE WorkOrderID = 425 | days to end a work order = SUBTRACT(ActualEndDate, ActualStartDate); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Which product has the highest price in 2012? | SELECT ProductID FROM ProductListPriceHistory WHERE StartDate LIKE '2012%' ORDER BY ListPrice DESC LIMIT 1 | price refers to ListPrice; highest price refers to MAX(ListPrice); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the cost for the product "847"? | SELECT StandardCost FROM ProductCostHistory WHERE ProductID = 847 | cost refers to StandardCost; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the organization level for Human Resources Manager? | SELECT OrganizationLevel FROM Employee WHERE JobTitle = 'Human Resources Manager' | Human Resources Manager is a job title |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many of the work orders didn’t meet the due date? | SELECT COUNT(WorkOrderID) FROM WorkOrder WHERE EndDate > DueDate | workers who did not meet the due date refers to EndDate>DueDate; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the cost and the product number of product with the id "888"? | SELECT T2.StandardCost, T2.ProductNumber FROM ProductCostHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 888 | cost refers to StandardCost; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | How many products using "roadster_black_small.gif" as the thumbnail photo? | SELECT COUNT(DISTINCT T2.ProductID) FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T1.LargePhotoFileName = 'roadster_black_large.gif' | products using roadster_black_small.gif as the thumbnail photo refers to ThumbnailPhotoFileName = 'roadster_black_small.gif'; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | List the locations ids, compartments and containers for the Lock Ring | SELECT T2.LocationID, T2.Shelf, T2.Bin FROM Product AS T1 INNER JOIN ProductInventory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Lock Ring' | compartment refers to Shelf; container refers to Bin; Lock Ring is a name of product |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What category do Road Frames fall into? | SELECT T2.Name FROM ProductSubcategory AS T1 INNER JOIN ProductCategory AS T2 ON T1.ProductCategoryID = T2.ProductCategoryID WHERE T1.Name = 'Road Frames' | Road Frames is a name of product subcategory |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | List all the scraped work orders for handling damage reason. | SELECT T2.WorkOrderID FROM ScrapReason AS T1 INNER JOIN WorkOrder AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.Name = 'Handling damage' | handling damage is descrription of manufacturing failure which refers to ScrapReason.Name |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the profit for the product "792"? | SELECT T1.ListPrice - T2.StandardCost FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 792 | profit = SUBTRACT(ListPrice, StandardCost); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Who owns the email address "regina7@adventure-works.com"? | SELECT T2.FirstName, T2.LastName FROM EmailAddress AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.EmailAddress = 'regina7@adventure-works.com' | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | Where are the locations where the product "810" is stored? | SELECT T2.Name FROM ProductInventory AS T1 INNER JOIN Location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.ProductID = 810 | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the name of the product the work order "2540" was making? | SELECT T2.Name FROM WorkOrder AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.WorkOrderID = 2540 | |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the price for the AWC Logo Cap? | SELECT T2.ListPrice FROM Product AS T1 INNER JOIN ProductListPriceHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'AWC Logo Cap' | price refers to ListPrice; price of 3 products = MULTIPLY(ListPrice, 3); Lock Washer 6 is a name of a product; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | List all the work orders that is related to the Down Tube. | SELECT T2.WorkOrderID FROM Product AS T1 INNER JOIN WorkOrder AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Down Tube' | Down Tube is a name of a product; |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What is the the average percentage of profit for the all the product? | SELECT AVG((T1.ListPrice - T2.StandardCost) * 100 / T2.StandardCost) FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID | average profit percentage = DIVIDE(SUBTRACT(ListPrice, StandardCost)), (StandardCost))); |
works_cycles | CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE CountryRegion
(
CountryRegionCode TEXT not null
primary key,
Name TEXT not null
unique,
ModifiedDate DATETIME default current_timestamp not null
);
CREATE TABLE Cultur... | 【DB_ID】 works_cycles
【Schema】
# Table: main.Address
[
(AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]),
(AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]),
(AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]),
(City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]),
(StateProvinceID:INTEGER, Exa... | What proportion of work order is in Subassembly? | SELECT 100.0 * SUM(CASE WHEN T1.Name = 'Subassembly' THEN 1 ELSE 0 END) / COUNT(T2.WorkOrderID) FROM Location AS T1 INNER JOIN WorkOrderRouting AS T2 ON T1.LocationID = T2.LocationID | proportion = DIVIDE(SUM(Name = 'Subassembly'). (COUNT(WorkOrderID))); |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many object samples are there in image no.1? | SELECT COUNT(OBJ_SAMPLE_ID) FROM IMG_OBJ WHERE IMG_ID = 1 | object samples refers to OBJ_SAMPLE_ID; image no.1 refers to IMG_ID = 1 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many images have over 20 object samples? | SELECT COUNT(T1.IMG_ID) FROM ( SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID HAVING COUNT(OBJ_SAMPLE_ID) > 20 ) T1 | over 20 object samples refers to COUNT(OBJ_SAMPLE_ID) > 20 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | What is the ID of the image with the most number of object samples? | SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1 | ID of the image refers to IMG_ID; most number of object samples refers to max(count(OBJ_SAMPLE_ID)) |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | Please list the IDs of the object samples in class no. 297 in image no.1. | SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 1 AND OBJ_CLASS_ID = 297 | IDs of the object samples refers to OBJ_SAMPLE_ID; class no. 297 in image no.1 refers to IMG_ID = 1 and OBJ_CLASS_ID = 297 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many self-relations are there between the object samples in image no.5? | SELECT SUM(CASE WHEN IMG_ID = 5 THEN 1 ELSE 0 END) FROM IMG_REL WHERE OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID | self-relations refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID; image no.5 refers to IMG_ID = 5 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | What is the bounding box of the object sample in image no.5 that has a self-relation? | 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.IMG_ID = 5 AND T1.OBJ1_SAMPLE_ID = T1.OBJ2_SAMPLE_ID | bounding box of the object sample refers to (x, y, W, H); image no.5 refers to IMG_ID = 5; has a self-relation refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many object samples in image no.1 are in the class of "man"? | SELECT SUM(CASE WHEN T1.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 | object samples refers to OBJ_CLASS_ID; image no.1 refers to IMG_ID = 1; in the class of "man" refers to OBJ_CLASS = 'man' |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many images have at least one object sample in the class of "man"? | SELECT COUNT(T.IMG_ID) FROM ( SELECT T2.IMG_ID FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.OBJ_CLASS = 'man' GROUP BY T2.IMG_ID ) T | have at least one object sample in the class of "man" refers to count(IMG_ID where OBJ_CLASS = 'man') > = 1 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | Please list the classes of all the object samples in image no.1. | 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.IMG_ID = 1 GROUP BY T1.OBJ_CLASS | classes of all the object samples refers to OBJ_CLASS; image no.1 refers to IMG_ID = 1 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | What is the relation between object sample no.8 and object sample no.4 in image no.1? | SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID = 8 AND T2.OBJ2_SAMPLE_ID = 4 | relation refers to PRED_CLASS; object sample no.8 and object sample no.4 refers to OBJ1_SAMPLE_ID = 8 AND OBJ2_SAMPLE_ID = 4; image no.1 refers to IMG_ID = 1 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many pairs of object samples in image no.1 have the relation of "parked on"? | SELECT SUM(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE 0 END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID != OBJ2_SAMPLE_ID | pairs of object samples refers to OBJ1_SAMPLE_ID and OBJ2_SAMPLE_ID; image no.1 refers to IMG_ID = 1; relation of "parked on" refers to PRED_CLASS = 'parked on' |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | Please list all the predicted relation classes of object sample no.14 in image no.1. | SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.OBJ1_SAMPLE_ID = 14 AND T2.OBJ2_SAMPLE_ID = 14 | predicted relation classes refers to PRED_CLASS; object sample no.14 in image no.1 refers to OBJ1_SAMPLE_ID = 14 AND OBJ2_SAMPLE_ID = 14 and IMG_ID = 1 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many images have at least one pair of object samples with the relation "parked on"? | SELECT SUM(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE 0 END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID | How many images have at least one pair of object samples with the relation "parked on" refers to count(IMG_ID) where OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID and PRED_CLASS = 'parked on' |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | Please list the IDs of all the images with more than 2 pairs of object samples with the relation "parked on". | SELECT T2.IMG_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.PRED_CLASS = 'parked on' AND T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID GROUP BY T2.IMG_ID HAVING COUNT(T2.IMG_ID) > 2 | IDs of all the images refers to IMG_ID; relation "parked on" refers to PRED_CLASS = 'parked on'; more than 2 pairs refers to count(IMG_ID) where OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | To which predicted relation class does the self-relation of the object sample in image no.5 belong? | SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 5 AND T2.OBJ1_SAMPLE_ID = T2.OBJ2_SAMPLE_ID | predicted relation class refers to PRED_CLASS; self-relations refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID; image no.5 refers to IMG_ID = 5 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | What are the bounding boxes of the object samples with a predicted relation class of "by" in image no.1? | SELECT T3.X, T3.Y, T3.W, T3.H FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 AND T1.PRED_CLASS = 'by' | bounding boxes of the object samples refers to (x, y, W, H); predicted relation class of "by" refers to PRED_CLASS = 'by'; image no.1 refers to IMG_ID = 1 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | What is the average difference in the y coordinate of 2 object samples with the relation "parked on" in image no.1? | SELECT CAST(SUM(T3.Y) AS REAL) / COUNT(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE NULL END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID | relation "parked on" refers to PRED_CLASS = 'parked on'; image no.1 refers to IMG_ID = 1; average difference in the y coordinate = divide(sum(Y), count(PRED_CLASS)) where OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | What is the percentage of the object samples in the class of "man" in image no.1? | SELECT CAST(COUNT(CASE WHEN T1.OBJ_CLASS = 'man' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.OBJ_CLASS_ID) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 | object samples refers to OBJ_SAMPLE_ID; class of "man" refers to OBJ_CLASS = 'man'; image no.1 refers to IMG_ID = 1; percentage = divide(count(OBJ_SAMPLE_ID)when OBJ_CLASS = 'man', count(OBJ_SAMPLE_ID)) as percentage |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | State the total number of the attribute classes. | SELECT COUNT(ATT_CLASS_ID) FROM ATT_CLASSES | attribute classes refers to ATT_CLASS |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many object classes are there in the database? | SELECT COUNT(OBJ_CLASS_ID) FROM OBJ_CLASSES | object classes refers to OBJ_CLASS |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | Provide the number of predicted classes. | SELECT COUNT(PRED_CLASS_ID) FROM PRED_CLASSES | predicted classes refers to PRED_CLASS |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | Give the bounding box of the kite in image no.2324765. | SELECT T2.X, T2.Y, T2.W, T2.H FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2324765 AND T1.OBJ_CLASS = 'kite' | bounding box refers to (x, y, W, H); kite refers to OBJ_CLASS = 'kite'; image no.2324765 refers to IMG_ID = 2324765 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many white objects are there in image no.2347915? | SELECT SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) 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 = 2347915 | white objects refers to ATT_CLASS = 'white'; image no.2347915 refers to IMG_ID = 2347915 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | Give the number of samples in image no.2377985 whose attribute is electrical. | SELECT SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) 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 = 2347915 | number of samples refers to OBJ_SAMPLE_ID; image no.2377985 refers to IMG_ID = 2377985; attribute is electrical refers to ATT_CLASS = 'electrical' |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | What is the relationship between object sample no.12 and no.8 of image no.2345511? | SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 2345511 AND T2.OBJ1_SAMPLE_ID = 12 AND T2.OBJ2_SAMPLE_ID = 8 | relationship refers to PRED_CLASS; object sample no.12 and no.8 of image no.2345511 refers to IMG_ID = 2345511 AND OBJ1_SAMPLE_ID = 12 AND OBJ2_SAMPLE_ID = 8 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | Give the object number of the sample which has the relationship of "lying on" with object sample no.1 from image no.2345524. | SELECT T2.OBJ1_SAMPLE_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 2345524 AND T1.PRED_CLASS = 'lying on' AND T2.OBJ2_SAMPLE_ID = 1 | object number of the sample refers to OBJ1_SAMPLE_ID; object sample no.1 from image no.2345524 refers to OBJ2_SAMPLE_ID = 1 and IMG_ID = 2345524 |
image_and_language | CREATE TABLE ATT_CLASSES
(
ATT_CLASS_ID INTEGER default 0 not null
primary key,
ATT_CLASS TEXT not null
);
CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS_ID INTEGER default 0 not null
primary key,
OBJ_CLASS TEXT not null
);
CREATE TABLE IMG_OBJ
(
IMG_ID INTEGER default... | 【DB_ID】 image_and_language
【Schema】
# Table: main.ATT_CLASSES
[
(ATT_CLASS_ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(ATT_CLASS:TEXT, Examples: [building s, indoors, cluttered])
]
# Table: main.IMG_OBJ
[
(IMG_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(OBJ_SAMPLE_ID:INTEGER, Primary Key, Examples: [1, 2, 3]),
... | How many samples of food object are there in image no.6? | SELECT COUNT(T2.OBJ_SAMPLE_ID) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 6 AND T1.OBJ_CLASS = 'food' | samples of food object refers to OBJ_CLASS = 'food'; image no.6 refers to IMG_ID = 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.