db_id stringclasses 66
values | question stringlengths 24 325 | evidence stringlengths 1 673 ⌀ | gold_query stringlengths 23 804 | db_schema stringclasses 66
values |
|---|---|---|---|---|
computer_student | Describe the year in program and in phase status for the student with most number in advisor. | student refers to advisedBy.p_id; most number in advisor refers to max(count(p_id_dummy)) | SELECT T2.yearsInProgram, T2.inPhase FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE course
(
course_id INTEGER constraint course_pk primary key,
courseLevel TEXT, -- Example Values: `Level_500`, `Level_300`, `Level_400` | Value Statics: Total count 132 - Distinct count 3 - Null count 0
);
CREATE TABLE advisedBy
(
p_id INTEGER, --
constraint advisedBy_pk primary key (p_id, p_id_d... |
mondial_geo | What is the capital of Australia? Is the capital a headquarter to any organization? Name the organization(s). | null | SELECT T2.Capital, T1.Name FROM organization AS T1 INNER JOIN country AS T2 ON T1.City = T2.Capital WHERE T2.Name = 'Australia' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | Calculate the total products that are supplied by Japan suppliers. | Japan Supplier refers to Country = 'Japan'; total product refers to Count (ProductName) | SELECT COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Japan' | 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... |
professional_basketball | List the full name and age of the player when he won the "Finals MVP" in 2003. | full name refers to firstName, middleName, lastName; age = subtract(2003, year(birthDate)); won the "Finals MVP" refers to award = 'Finals MVP'; in 2003 refers to year = 2003 | SELECT T1.firstName, T1.middleName, T1.lastName , 2003 - strftime('%Y', T1.birthDate) FROM awards_players AS T2 JOIN players AS T1 ON T2.playerID = T1.playerID WHERE T2.award = 'Finals MVP' AND T2.year = 2003 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
superstore | What category does the item ordered by Katherine Murray on 11/4/2018 in the South region belong to? | ordered by Katherine Murray refers to "Customer Name" = 'Katherine Murray'; on 11/4/2018 refers to "Order Date" = Date('2018-11-04'); | SELECT DISTINCT T3.Category FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Katherine Murray' AND T1.`Order Date` = '2018-11-04' AND T2.Region = 'South' | CREATE TABLE west_superstore
(
Profit REAL, --
Region TEXT, -- Example Values: `West` | Value Statics: Total count 6406 - Distinct count 1 - Null count 0
"Product ID" TEXT, --
foreign key ("Product ID", Region) references product("Product ID",Region),
"Order Date" DATE, --
foreign key ("Customer ID", Reg... |
synthea | How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive? | patients who have stopped taking medication for 'coronary heart disease' refer to PATIENT where REASONDESCRIPTION = 'Coronary Heart Disease' and STOP is not null from medications; if deathdate is null, it means this patient is still alive; | SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL | CREATE TABLE immunizations
(
foreign key (ENCOUNTER) references encounters(ID),
CODE INTEGER, -- Example Values: `8`, `62`, `140`, `113`, `83` | Value Statics: Total count 13189 - Distinct count 16 - Null count 0
foreign key (PATIENT) references patients(patient),
ENCOUNTER TEXT, --
PATIENT TEXT, --
DATE D... |
mondial_geo | Name the organizations with the most members. | null | SELECT T1.Name FROM organization AS T1 INNER JOIN isMember AS T2 ON T2.Country = T1.Country INNER JOIN country AS T3 ON T2.Country = T3.Code GROUP BY T1.Name ORDER BY COUNT(T3.Name) DESC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | Please calculate the average unit price for products of Formaggi Fortini s.r.l. | "Formaggi Fortini s.r.l." is the CompanyName; average unit price = AVG(UnitPrice) | SELECT SUM(T1.UnitPrice) / COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Formaggi Fortini s.r.l.' | 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... |
professional_basketball | From which college was the player who won the most award in 1970. | college refers to highSchool; won the most award refers to max(count(award)); in 1970 refers to year = 1970 | SELECT college FROM players WHERE playerID = ( SELECT playerID FROM awards_players WHERE year = 1970 GROUP BY playerID ORDER BY COUNT(award) DESC LIMIT 1 ) | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
superstore | What percentage do items under the category of 'Furniture' make up the total number of items ordered that are shipped as standard in the West region? | shipped as standard refers to "Ship Mode" = 'Standard Class'; Region = 'West'; percentage refers to DIVIDE(SUM(Quantity where Category = 'Furniture'), SUM(Quantity)) * 1.0 | SELECT CAST(SUM(CASE WHEN T2.Category = 'Furniture' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'West' AND T1.`Ship Mode` = 'Standard Class' | CREATE TABLE west_superstore
(
Profit REAL, --
Region TEXT, -- Example Values: `West` | Value Statics: Total count 6406 - Distinct count 1 - Null count 0
"Product ID" TEXT, --
foreign key ("Product ID", Region) references product("Product ID",Region),
"Order Date" DATE, --
foreign key ("Customer ID", Reg... |
computer_student | List the course IDs and levels of person IDs from 40 to 50. | course IDs and levels refers to course.course_id and courseLevel; person IDs from 40 to 50 refers to taughtBy.p_id between 40 and 50 | SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id BETWEEN 40 AND 50 | CREATE TABLE course
(
course_id INTEGER constraint course_pk primary key,
courseLevel TEXT, -- Example Values: `Level_500`, `Level_300`, `Level_400` | Value Statics: Total count 132 - Distinct count 3 - Null count 0
);
CREATE TABLE advisedBy
(
p_id INTEGER, --
constraint advisedBy_pk primary key (p_id, p_id_d... |
mondial_geo | List all countries with 'Category III' membership in 'IFAD' organization. Please also provide the capital of the country. | null | SELECT Name, Capital FROM country WHERE Code IN ( SELECT Country FROM isMember WHERE type = 'Category III' AND Organization = 'IFAD' ) | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | How many products have been discountinued by New Orleans Cajun Delights? | "New Orleans Cajun Delights" is the CompanyName; discontinued refers to Discontinued = 1 | SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights' | 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... |
professional_basketball | Please list down the last name of players from "BLB" team. | "BLB" is the tmID | SELECT T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = 'BLB' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
synthea | How many patients with 'allergy to eggs' have been immunized with 'Td (adult) preservative free'? | allergy to eggs' refers to allergies where DESCRIPTION = 'Allergy to eggs'; immunized with 'Td (adult) preservative free' refers to immunizations where DESCRIPTION = 'Td (adult) preservative free'; | SELECT COUNT(DISTINCT T2.patient) FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN immunizations AS T3 ON T2.patient = T3.PATIENT WHERE T1.DESCRIPTION = 'Allergy to eggs' AND T3.DESCRIPTION = 'Td (adult) preservative free' | CREATE TABLE immunizations
(
foreign key (ENCOUNTER) references encounters(ID),
CODE INTEGER, -- Example Values: `8`, `62`, `140`, `113`, `83` | Value Statics: Total count 13189 - Distinct count 16 - Null count 0
foreign key (PATIENT) references patients(patient),
ENCOUNTER TEXT, --
PATIENT TEXT, --
DATE D... |
computer_student | List the person IDs and course levels of the affiliated professors in faculty. | person IDs refers to person.p_id; affiliated professors in faculty refers to professor = 1 and hasPosition = 'Faculty_aff' | SELECT T1.p_id, T3.courseLevel FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T1.hasPosition = 'Faculty_aff' | CREATE TABLE course
(
course_id INTEGER constraint course_pk primary key,
courseLevel TEXT, -- Example Values: `Level_500`, `Level_300`, `Level_400` | Value Statics: Total count 132 - Distinct count 3 - Null count 0
);
CREATE TABLE advisedBy
(
p_id INTEGER, --
constraint advisedBy_pk primary key (p_id, p_id_d... |
mondial_geo | Which country has the least organization membership? | null | SELECT country FROM organization WHERE country IN ( SELECT Code FROM country ) GROUP BY country ORDER BY COUNT(NAME) LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | List down the quantity per unit for products of Tokyo Traders. | "Tokyo Traders" is the CompanyName | SELECT T1.QuantityPerUnit FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Tokyo Traders' | 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... |
superstore | How much is the total quantity of items from the East region shipped on 3/25/2015? Name the products. | shipped on 3/25/2015 refers to "Ship Date" = Date('2015-03-25'); | SELECT SUM(T1.Quantity), T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Date` = '2015-03-25' AND T2.Region = 'East' | CREATE TABLE west_superstore
(
Profit REAL, --
Region TEXT, -- Example Values: `West` | Value Statics: Total count 6406 - Distinct count 1 - Null count 0
"Product ID" TEXT, --
foreign key ("Product ID", Region) references product("Product ID",Region),
"Order Date" DATE, --
foreign key ("Customer ID", Reg... |
computer_student | List down the advised student IDs and IDs of employing professor in faculty. | advised student IDs refers to person.p_id; IDs of employing professor in faculty refers to p_id_dummy and hasPosition = 'Faculty_eme' | SELECT T1.p_id, T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE hasPosition = 'Faculty_eme' | CREATE TABLE course
(
course_id INTEGER constraint course_pk primary key,
courseLevel TEXT, -- Example Values: `Level_500`, `Level_300`, `Level_400` | Value Statics: Total count 132 - Distinct count 3 - Null count 0
);
CREATE TABLE advisedBy
(
p_id INTEGER, --
constraint advisedBy_pk primary key (p_id, p_id_d... |
mondial_geo | What is the organization(s) that has 'National Society' as member type. | null | SELECT T1.Name FROM organization AS T1 INNER JOIN isMember AS T2 ON T2.Country = T1.Country INNER JOIN country AS T3 ON T2.Country = T3.Code WHERE T2.Type = 'National Society' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | What are the product names of Exotic Liquids? | "Exotic Liquids" is the CompanyName | SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids' | 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... |
professional_basketball | What is the percentage of offense rebounds from the total rebounds of the players in year 2000. | in year 2000 refers to year = 2000; percentage = divide(sum(o_rebounds), sum(rebounds)) * 100% | SELECT CAST(SUM(T2.o_rebounds) AS REAL) * 100 / SUM(T2.rebounds) FROM players_teams AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 2000 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
synthea | Indicate the patient's full name with the lowest body mass index in kg/m2. | full name refers to first, last; the lowest body mass index in kg/m2 refers to DESCRIPTION = Body Mass Index from observations where MIN(VALUE) and UNITS = 'kg/m2'; | SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Body Mass Index' AND T2.UNITS = 'kg/m2' ORDER BY T2.VALUE LIMIT 1 | CREATE TABLE immunizations
(
foreign key (ENCOUNTER) references encounters(ID),
CODE INTEGER, -- Example Values: `8`, `62`, `140`, `113`, `83` | Value Statics: Total count 13189 - Distinct count 16 - Null count 0
foreign key (PATIENT) references patients(patient),
ENCOUNTER TEXT, --
PATIENT TEXT, --
DATE D... |
mondial_geo | State the area and population of the country where Asia Pacific Economic Cooperation headquarter is located. | Asia Pacific Economic Cooperation is an organization name | SELECT T2.Name, T2.Population FROM organization AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Name = 'Asia Pacific Economic Cooperation' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | Calculate the average salary per order for Andrew Fuller. | average salary = AVG(Salary) | SELECT CAST(SUM(T1.Salary) AS REAL) / COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Andrew' AND T1.LastName = 'Fuller' | 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... |
professional_basketball | List out all the players fullname who won the championship in 1970. | full name refers to firstName, middleName, lastName; won the championship refers to round = 'F'; in 1970 refers to year = 1970 | SELECT DISTINCT T3.firstName, T3.middleName, T3.lastName FROM series_post AS T1 INNER JOIN players_teams AS T2 ON T1.tmIDWinner = T2.tmID INNER JOIN players AS T3 ON T3.playerID = T2.playerID WHERE T1.year = 1970 AND T1.round = 'F' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
superstore | Which customer ordered 'Global High-Back Leather Tilter, Burgundy' on 10/13/2013 in the East region? | 'Global High-Back Leather Tilter, Burgundy' is the "Product Name"; on 10/13/2013 refers to "Order Date" = Date('2013-10-13'); Region = 'East' | SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Global High-Back Leather Tilter, Burgundy' AND T1.`Order Date` = '2013-10-13' AND T1.Region = 'East' | CREATE TABLE west_superstore
(
Profit REAL, --
Region TEXT, -- Example Values: `West` | Value Statics: Total count 6406 - Distinct count 1 - Null count 0
"Product ID" TEXT, --
foreign key ("Product ID", Region) references product("Product ID",Region),
"Order Date" DATE, --
foreign key ("Customer ID", Reg... |
computer_student | Mention the person ID of faculty professor who taught course ID 104 and the course level. | person ID refers to person.p_id; faculty professor refers to professor = 1 and hasPosition ! = 0 | SELECT T1.p_id, T3.courseLevel FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T3.course_id = 104 AND T1.hasPosition <> 0 | CREATE TABLE course
(
course_id INTEGER constraint course_pk primary key,
courseLevel TEXT, -- Example Values: `Level_500`, `Level_300`, `Level_400` | Value Statics: Total count 132 - Distinct count 3 - Null count 0
);
CREATE TABLE advisedBy
(
p_id INTEGER, --
constraint advisedBy_pk primary key (p_id, p_id_d... |
mondial_geo | List all members and member type of the Islamic Development Bank. | null | SELECT T2.Country, T2.Type FROM organization AS T1 INNER JOIN isMember AS T2 ON T1.Abbreviation = T2.Organization INNER JOIN country AS T3 ON T2.Country = T3.Code WHERE T1.Name = 'Islamic Development Bank' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | How many orders have Margaret Peacock placed? | null | SELECT COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Margaret' AND T1.LastName = 'Peacock' | 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... |
professional_basketball | List all the coatches of the Oklahoma City Thunder | coach refers to coachID; Oklahoma City Thunder refers to name = 'Oklahoma City Thunder' | SELECT DISTINCT coachID FROM coaches AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID WHERE name = 'Oklahoma City Thunder' | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
superstore | What is the total sales of 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack' in the Central region? | 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack' is the "Product Name"; | SELECT SUM(T1.Sales) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack' AND T2.Region = 'Central' | CREATE TABLE west_superstore
(
Profit REAL, --
Region TEXT, -- Example Values: `West` | Value Statics: Total count 6406 - Distinct count 1 - Null count 0
"Product ID" TEXT, --
foreign key ("Product ID", Region) references product("Product ID",Region),
"Order Date" DATE, --
foreign key ("Customer ID", Reg... |
synthea | What gender is more prone to 'dander (animal) allergy'? | gender who is more prone to dander (animal) allergy refers to MAX(COUNT(Gender WHERE allergies.DESCRIPTION = 'Dander (animal) allergy')); | SELECT T1.gender FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Dander (animal) allergy' GROUP BY T1.gender ORDER BY COUNT(T1.gender) DESC LIMIT 1 | CREATE TABLE immunizations
(
foreign key (ENCOUNTER) references encounters(ID),
CODE INTEGER, -- Example Values: `8`, `62`, `140`, `113`, `83` | Value Statics: Total count 13189 - Distinct count 16 - Null count 0
foreign key (PATIENT) references patients(patient),
ENCOUNTER TEXT, --
PATIENT TEXT, --
DATE D... |
mondial_geo | Among the country member of 'IOC' organization, which country has the most population? | null | SELECT T2.Name FROM isMember AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Organization = 'IOC' ORDER BY T2.Population DESC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | Where are the ship countries of orders placed by Janet Leverling? | null | SELECT DISTINCT T2.ShipCountry FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Janet' AND T1.LastName = 'Leverling' | 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... |
mondial_geo | State all countries with border greater than 4,000. List the full country name. | null | SELECT T1.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 WHERE T2.Length > 4000 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | List down the customer ids who placed order with Michael Suyama. | null | SELECT T2.CustomerID 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... |
professional_basketball | List the full name of players who are drafted from round 1 in 1973 but not born in USA. | full name refers to firstName, middleName, lastName; in 1973 refers to year = 1973; not born in USA refers to birthCountry <> 'USA' | SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN draft AS T2 ON T1.playerID = T2.playerID WHERE T2.draftRound = 1 AND T1.birthCountry != 'USA' AND T2.draftYear = 1973 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
superstore | Name the item ordered by Jonathan Doherty with the highest quantity in the East region. | Jonathan Doherty is the "Customer Name"; highest quantity refers to MAX(Quantity); Region = 'East' | SELECT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Jonathan Doherty' AND T2.Region = 'East' ORDER BY T1.Quantity DESC LIMIT 1 | CREATE TABLE west_superstore
(
Profit REAL, --
Region TEXT, -- Example Values: `West` | Value Statics: Total count 6406 - Distinct count 1 - Null count 0
"Product ID" TEXT, --
foreign key ("Product ID", Region) references product("Product ID",Region),
"Order Date" DATE, --
foreign key ("Customer ID", Reg... |
mondial_geo | Name all countries in which have border with Bulgaria. | Bulgaria is a country name | SELECT T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 WHERE T1.Name = 'Bulgaria' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | Write down the notes of employee with the highest salary. | highest salary refers to Max(Salary) | SELECT Notes FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees ) | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
synthea | Indicate the full name of the patients who have 3 different allergies. | full name refers to first, last; have 3 different allergies refer to allergies where COUNT(DESCRIPTION) > 3; | SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT GROUP BY T1.patient ORDER BY COUNT(DISTINCT T2.DESCRIPTION) > 3 | CREATE TABLE immunizations
(
foreign key (ENCOUNTER) references encounters(ID),
CODE INTEGER, -- Example Values: `8`, `62`, `140`, `113`, `83` | Value Statics: Total count 13189 - Distinct count 16 - Null count 0
foreign key (PATIENT) references patients(patient),
ENCOUNTER TEXT, --
PATIENT TEXT, --
DATE D... |
computer_student | List the professor ID who taught the course ID from 121 to 130 of basic undergraduate courses. | professor ID refers to taughtBy.p_id; course ID from 121 to 130 of basic undergraduate courses refers to courseLevel = 'Level_300' and course.course_id between 121 and 130 | SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_300' AND T1.course_id > 121 AND T1.course_id < 130 | CREATE TABLE course
(
course_id INTEGER constraint course_pk primary key,
courseLevel TEXT, -- Example Values: `Level_500`, `Level_300`, `Level_400` | Value Statics: Total count 132 - Distinct count 3 - Null count 0
);
CREATE TABLE advisedBy
(
p_id INTEGER, --
constraint advisedBy_pk primary key (p_id, p_id_d... |
mondial_geo | Which 2 countries' border span across the longest length? Provide the country's full name. | null | SELECT T1.Name, T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 ORDER BY T2.Length DESC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | Is (206) 555-1189 the home phone number for Laura Callahan? | "Laura Callahan" refers to FirstName = 'Laura AND LastName = 'Callahan | SELECT CASE WHEN HomePhone = '(206) 555-1189' THEN 'YES' ELSE 'NO' END 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... |
professional_basketball | List the year, team and coach that with winning rate of above 75%. | team refers to teams.name; coach refers to coachID; winning rate of above 75% refers to divide(won, add(won, lost)) > 0.75 | SELECT DISTINCT T1.year, T2.name, T1.coachID FROM coaches AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID WHERE CAST(T1.won AS REAL) / CAST((T1.won + T1.lost) AS REAL) > 0.75 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
superstore | Which item was shipped on 3/4/2013 and scheduled for same day delivery in the South region? | shipped on 3/4/2013 refers to "Order Date" = date('2013-03-04'); same day delivery refers to "Ship Mode" = 'Same Day'; item refers to "Product Name" | SELECT T2.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Date` = '2013-03-04' AND T2.Region = 'South' AND T1.`Order Date` = '2013-03-04' | CREATE TABLE west_superstore
(
Profit REAL, --
Region TEXT, -- Example Values: `West` | Value Statics: Total count 6406 - Distinct count 1 - Null count 0
"Product ID" TEXT, --
foreign key ("Product ID", Region) references product("Product ID",Region),
"Order Date" DATE, --
foreign key ("Customer ID", Reg... |
synthea | How many patients with a body weight of more than 100 kg have a 'diabetes self-management plan' care plan? | body weight of more than 100 kg refers to observations.DESCRIPTION = 'Body Weight' AND observations.VALUE > 100 AND observations.UNITS = 'kg'; diabetes self-management plan refers to careplans.DESCRIPTION = 'Diabetes self management plan'; | SELECT COUNT(DISTINCT T2.patient) FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN observations AS T3 ON T2.patient = T3.PATIENT WHERE T3.DESCRIPTION = 'Body Weight' AND T1.DESCRIPTION = 'Diabetes self management plan' AND T3.VALUE > 100 AND T3.UNITS = 'kg' | CREATE TABLE immunizations
(
foreign key (ENCOUNTER) references encounters(ID),
CODE INTEGER, -- Example Values: `8`, `62`, `140`, `113`, `83` | Value Statics: Total count 13189 - Distinct count 16 - Null count 0
foreign key (PATIENT) references patients(patient),
ENCOUNTER TEXT, --
PATIENT TEXT, --
DATE D... |
computer_student | Describe the course level and list of person IDs who taught course ID of 147. | person IDs refers to taughtBy.p_id; course ID of 147 refers to course.course_id = 147 | SELECT T1.courseLevel, T1.course_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 141 | CREATE TABLE course
(
course_id INTEGER constraint course_pk primary key,
courseLevel TEXT, -- Example Values: `Level_500`, `Level_300`, `Level_400` | Value Statics: Total count 132 - Distinct count 3 - Null count 0
);
CREATE TABLE advisedBy
(
p_id INTEGER, --
constraint advisedBy_pk primary key (p_id, p_id_d... |
mondial_geo | List all the organisations that where its name contains 'United Nation'. State its full name and its headquarter city. | null | SELECT Name, City FROM organization WHERE Name LIKE '%United Nation%' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
retail_world | Calculate the total salary for employees from UK. | "UK" is the Country; total salary refers to Sum(Salary) | SELECT SUM(Salary) FROM Employees WHERE Country = 'UK' | 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... |
professional_basketball | How many players, in games played in 1990, achieved 50% or less of oRebounds than dRebounds. | in 1990 refers to season_id = 1990; 50% or less of oRebounds than dRebounds refers to o_rebounds < = multiply(d_rebounds, 0.5) | SELECT COUNT(playerID) FROM players_teams WHERE CAST(oRebounds AS REAL) * 100 / dRebounds <= 50 AND year = 1990 | CREATE TABLE players_teams
(
PostGS INTEGER, --
PostdRebounds INTEGER, --
PostPF INTEGER, --
tmID TEXT, --
threeAttempted INTEGER, --
PostRebounds INTEGER, --
assists INTEGER, --
threeMade INTEGER, --
PostBlocks INTEGER, --
PostTurnovers INTEGER, --
GP INTEGER, --
lgID TEXT, -- Example... |
computer_student | Find the professor ID and position in faculty who taught high-level undergraduate course of less than 10 in ID. | professor ID refers to person.p_id when professor = 1; position in faculty refers to hasPosition; high-level undergraduate course refers to courseLevel = 'Level_400'; less than 10 in ID refers to course.course_id < 10 | SELECT T1.p_id, T1.hasPosition FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T3.courseLevel = 'Level_400' AND T2.course_id < 10 | CREATE TABLE course
(
course_id INTEGER constraint course_pk primary key,
courseLevel TEXT, -- Example Values: `Level_500`, `Level_300`, `Level_400` | Value Statics: Total count 132 - Distinct count 3 - Null count 0
);
CREATE TABLE advisedBy
(
p_id INTEGER, --
constraint advisedBy_pk primary key (p_id, p_id_d... |
ice_hockey_draft | Who is the most valuable player who played in the 2000-2001 season of the International league? | most valuable player refers to MAX(P); 2000-2001 season refers to SEASON = '2000-2001'; International league refers to LEAGUE = 'International'; | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.LEAGUE = 'International' ORDER BY T1.P DESC LIMIT 1 | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | How many hours in total did all of the Delta Air Lines aircraft were delayed due to a late aircraft in August of 2018? Identify the plane number of the aircraft with the highest delayed hours. | hours in total = DIVIDE(SUM(LATE_AIRCRAFT_DELAY), 60); Delta Air Lines refers to Description = 'Delta Air Lines Inc.: DL'; delayed due to a late aircraft refers to LATE_AIRCRAFT_DELAY; in August of 2018 refers to FL_DATE like '2018/8/%'; plane number refers to TAIL_NUM; highest delayed hours refers to MAX(DIVIDE(SUM(LA... | SELECT T1.TAIL_NUM, SUM(CAST(T1.LATE_AIRCRAFT_DELAY AS REAL) / 60) AS delay FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T2.Code = T1.OP_CARRIER_AIRLINE_ID WHERE T1.FL_DATE LIKE '2018/8/%' AND T2.Description = 'Delta Air Lines Inc.: DL' ORDER BY delay DESC LIMIT 1 | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
video_games | Give the game publisher ID of records with platform ID 15. | platform ID 15 refers to platform_id = 15 | SELECT T.game_publisher_id FROM game_platform AS T WHERE T.platform_id = 15 | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
ice_hockey_draft | List the names of all players from Avangard Omsk that have played for playoffs in season 2000-2001. | names of the players refers to PlayerName; Avangard Omsk refers to TEAM = 'Avangard Omsk'; playoffs refers to GAMETYPE = 'Playoffs'; 2000-2001 season refers to SEASON = '2000-2001'; | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.TEAM = 'Avangard Omsk' AND T1.GAMETYPE = 'Playoffs' | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
video_games | State the region id of Japan. | region id refers to region.id; Japan refers to region_name = 'Japan' | SELECT T.id FROM region AS T WHERE T.region_name = 'Japan' | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
soccer_2016 | How many matches were there in May, 2008? | in May 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5' | SELECT COUNT(Match_Id) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008' AND SUBSTR(Match_Date, 7, 1) = '5' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
ice_hockey_draft | How many players were drafted by Arizona Coyotes whose height reaches 195 centimeters? | drafted by Arizona Coyotes refers to overallby = 'Arizona Coyotes'; height reaches 195 centimeters refers to height_in_cm = 195; | SELECT COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.overallby = 'Arizona Coyotes' AND T1.height_in_cm = 195 | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | What is the code of Mississippi Valley Airlines? | Mississippi Valley Airlines refers to Description like 'Mississippi Valley Airlines%'; | SELECT Code FROM `Air Carriers` WHERE Description LIKE 'Mississippi Valley Airlines%' | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
video_games | List down the names of platform where the games released in 2016 can be played on. | name of platform refers to platform_name; released in 2016 refers to release_year = 2016 | SELECT DISTINCT T1.platform_name FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id WHERE T2.release_year = 2016 | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
ice_hockey_draft | Who among the players drafted by Arizona Coyotes in 2000 has committed the highest rule violations? | who refers to PlayerName; drafted by Arizona Coyotes refers to overallby = 'Arizona Coyotes'; committed the highest rule violations refers to MAX(PIM); in 2000 refers to draftyear = 2000; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.overallby = 'Arizona Coyotes' AND T2.draftyear = 2000 ORDER BY T1.PIM DESC LIMIT 1 | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | What is the scheduled local departure time and the actual departure time of the flight from Philadelphia to Harrisburg with the plane's tail number N627AE on the 13th of August 2018? | scheduled local departure time refers to CRS_DEP_TIME; actual departure time refers to DEP_TIME; from Philadelphia refers to ORIGIN = 'PHL'; to Harrisburg refers to DEST = 'MDT'; tail number refers to TAIL_NUM; TAIL_NUM = 'N627AE'; on the 13th of August 2018 refers to FL_DATE = '2018/8/13'; | SELECT CRS_DEP_TIME, DEP_TIME FROM Airlines WHERE ORIGIN = 'PHL' AND DEST = 'MDT' AND TAIL_NUM = 'N627AE' AND FL_DATE = '2018/8/13' | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
video_games | Provide the release year of record ID 1 to 10. | record ID 1 to 10 refers to game.id BETWEEN 1 AND 10 | SELECT T.release_year FROM game_platform AS T WHERE T.id BETWEEN 1 AND 10 | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
ice_hockey_draft | List the names of all players in team Avangard Omsk in season 2000-2001. | names of the players refers to PlayerName; team Avangard Omsk refers to TEAM = 'Avangard Omsk'; 2000-2001 season refers to SEASON = '2000-2001'; | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.TEAM = 'Avangard Omsk' | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | What is the only flight destination for flights from Albany? | flight destination refers to DEST; from Albany refers to ORIGIN = 'ABY'; | SELECT DEST FROM Airlines WHERE ORIGIN = 'ABY' GROUP BY DEST | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
video_games | What is the number of sales in region ID 2 with game platform ID 9615? | number of sales refers to multiply(num_sales, 100000) | SELECT T.num_sales * 100000 FROM region_sales AS T WHERE T.region_id = 2 AND T.game_platform_id = 9615 | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
soccer_2016 | How many players are from Australia? | Australia refers to Country_Name = 'Australia' | SELECT COUNT(CASE WHEN T2.Country_Name = 'Australia' THEN T1.Player_Id ELSE NULL END) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
ice_hockey_draft | Who among the players in season 2000-2001 has committed the highest rule violations or penalty minutes? | committed the highest rule violations or penalty minutes refers to MAX(PIM); 2000-2001 season refers to SEASON = '2000-2001' | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' ORDER BY T1.PIM DESC LIMIT 1 | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | Which airline does the aircraft with the fastest flight belong to? | fastest flight refers to MIN(SUBTRACT(ACTUAL_ELAPSED_TIME, CRS_ELAPSED_TIME)); | SELECT T1.OP_CARRIER_AIRLINE_ID FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T1.ORIGIN = T2.Code WHERE T1.ACTUAL_ELAPSED_TIME IS NOT NULL AND T1.CRS_ELAPSED_TIME IS NOT NULL ORDER BY T1.ACTUAL_ELAPSED_TIME - T1.CRS_ELAPSED_TIME ASC LIMIT 1 | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
soccer_2016 | How many players were born after the year 1985? | born after the year 1985 refers to SUBSTR(DOB, 1, 4) > 1985 | SELECT COUNT(Player_Id) FROM Player WHERE SUBSTR(DOB, 1, 4) > 1985 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
ice_hockey_draft | Among the USA players, who has the lightest weight? | USA refers to nation = 'USA' ; players refers to PlayerName; lightest weight refers to MIN(weight_in_lbs);
| SELECT T2.PlayerName FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T2.nation = 'USA' ORDER BY T1.weight_in_lbs ASC LIMIT 1 | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
video_games | What is the average number of sales in Japan? | in Japan refers to region_name = 'Japan'; average number of sales = multiply(avg(num_sales), 100000) where region_name = 'Japan' | SELECT AVG(T2.num_sales) * 100000 AS avg_japan FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'Japan' | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
soccer_2016 | Please list the IDs of all the matches in the year 2008. | ID of matches refers to Match_Id; in the year 2008 refers to SUBSTR(Match_Date, 1, 4) = '2008' | SELECT Match_Id FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
ice_hockey_draft | What is the percentage of Russian players who have a height of under 200 inch? | percentage = MULTIPLY(DIVIDE(SUM(nation = 'Russia' WHERE height_in_cm < 200), COUNT(ELITEID)), 100); Russian refers to nation = 'Russia'; players refers to PlayerName; height of under 200 inch refers to height_in_cm < 200; | SELECT CAST(COUNT(CASE WHEN T1.height_in_cm < 200 AND T2.nation = 'Russia' THEN T2.ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | What are the destinations of the flights with air carrier description "Southeast Alaska Airlines: WEB"? | destinations refers to DEST; Southeast Alaska Airlines: WEB refers to Description = 'Southeast Alaska Airlines: WEB'; | SELECT T2.DEST FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Southeast Alaska Airlines: WEB' | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
video_games | List down the record ID of records released between 2000 to 2003. | record ID refers to game.id; released between 2000 to 2003 refers to release_year BETWEEN 2000 AND 2003 | SELECT T.id FROM game_platform AS T WHERE T.release_year BETWEEN 2000 AND 2003 | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
ice_hockey_draft | How many players were born in 1982 and have a height above 182cm? | born in 1982 refers to birthyear = 1982; height above 182cm refers to height_in_cm > 182 ; | SELECT COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T1.height_in_cm > 182 AND strftime('%Y', T2.birthdate) = '1982' | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | Provide the air carrier description of the flight with the highest actual elapsed time. | highest actual elapsed time refers to MAX(ACTUAL_ELAPSED_TIME); | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.ACTUAL_ELAPSED_TIME DESC LIMIT 1 | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
ice_hockey_draft | List out the name of players who have a height of 5'8". | name of players refers to PlayerName; height of 5'8" refers to height_in_inch = '5''8"'; | SELECT T2.PlayerName FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T1.height_in_inch = '5''8"' | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | Among the flights with air carrier described as Asap Air Inc.: ASP, what is the tail number of the flight with the longest departure delay? | Asap Air Inc.: ASP refers to Description = 'Asap Air Inc.: ASP'; tail number refers to TAIL_NUM; longest departure delay refers to MAX(DEP_DELAY); | SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Asap Air Inc.: ASP' ORDER BY T2.DEP_DELAY DESC LIMIT 1 | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
video_games | When was the game titled 3DS Classic Collection released? | when refers to release_year; the game titled 3DS Classic Collection refers to game_name = '3DS Classic Collection' | SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = '3DS Classic Collection' | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
ice_hockey_draft | Among the Italian players, who has the shortest height? | Italian refers to nation = 'Italy'; players refers to PlayerName; shortest height refers to MIN(height_in_cm); | SELECT T2.PlayerName FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.nation = 'Italy' ORDER BY T1.height_in_cm ASC LIMIT 1 | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | List the air carrier's description of the flights with 0 departure delay. | 0 departure delay refers to DEP_DELAY = 0; | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEP_DELAY = 0 GROUP BY T1.Description | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
video_games | List down the name of games published by 3DO. | name of game refers to game_name; published by 3DO refers to publisher_name = '3DO' | SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T3.publisher_name = '3DO' | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
ice_hockey_draft | What is the highest point highest point of Per Mars in the draft year? | highest point in the draft year refers to MAX(P); | SELECT T1.P FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Per Mars' ORDER BY T1.P DESC LIMIT 1 | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
video_games | What is the id of the game "Resident Evil Archives: Resident Evil"? | id of game refers to game.id; "Resident Evil Archives: Resident Evil" refers to game_name = 'Resident Evil Archives: Resident Evil' | SELECT T.genre_id FROM game AS T WHERE T.game_name = 'Resident Evil Archives: Resident Evil' | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
soccer_2016 | What is the bowling skill of SC Ganguly? | SC Ganguly refers to Player_Name = 'SC Ganguly' | SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id WHERE T2.Player_Name = 'SC Ganguly' | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
ice_hockey_draft | List out the nation of players who played for the 1997-1998 season . | players refers to PlayerName; 1997-1998 season refers to SEASON = '1997-1998'; | SELECT DISTINCT T2.nation FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998' | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | From August 10 to August 20, 2018, how many cancelled flights of air carrier named Spirit Air Lines: NK are there? | From August 10 to August 20, 2018 refers to FL_DATE BETWEEN '2018/8/10' AND '2018/8/20'; cancelled flights refers to CANCELLED = 1; Trans Southern Airways: 'Spirit Air Lines: NK' refers to Description = 'Spirit Air Lines: NK'; | SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Spirit Air Lines: NK' AND T2.CANCELLED = 0 AND T2.FL_DATE BETWEEN '2018/8/10' AND '2018/8/20' | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
soccer_2016 | For how many times has player no.41 won the "man of the match" award? | player no.41 won the "man of the match" refers to Man_of_the_Match = 41 | SELECT COUNT(Match_Id) FROM `Match` WHERE Man_of_the_Match = 41 | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
ice_hockey_draft | Mention the type of game that Matthias Trattnig played. | type of game refers to GAMETYPE; | SELECT DISTINCT T1.GAMETYPE FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Matthias Trattnig' | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | What is the air carrier's description of the cancelled flights? | cancelled flights refers to CANCELLED = 1; | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.CANCELLED = 1 GROUP BY T1.Description | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
video_games | List the region name where games reached 300000 sales and above. | reached 300000 sales and above refers to num_sales > 3 | SELECT DISTINCT T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T2.num_sales * 100000 > 300000 | CREATE TABLE region_sales
(
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (game_platform_id) references game_platform(id),
foreign key (region_id) references region(id),
region_id INTEGER default NULL, -- Example Values: `1`, `... |
soccer_2016 | Please list the bowling skills of all the players from Australia. | Australia refers to Country_Name = 'Australia' | SELECT T2.Bowling_Skill FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id INNER JOIN Country AS T3 ON T1.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'Australia' GROUP BY T2.Bowling_Skill | CREATE TABLE Win_By
(
Win_Id INTEGER primary key,
Win_Type TEXT, -- Example Values: `runs`, `wickets`, `NO Result`, `Tie` | Value Statics: Total count 4 - Distinct count 4 - Null count 0
);
CREATE TABLE Wicket_Taken
(
Kind_Out INTEGER, -- Example Values: `2`, `1`, `3`, `4`, `5` | Value Statics: Total count 6727 ... |
ice_hockey_draft | List out the seasons that Niklas Eckerblom played. | FALSE; | SELECT DISTINCT T1.SEASON FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Niklas Eckerblom' | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
ice_hockey_draft | Which team does Andreas Jamtin belong to? | FALSE; | SELECT DISTINCT T1.TEAM FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Andreas Jamtin' | CREATE TABLE PlayerInfo
(
CSS_rank INTEGER, --
draftyear INTEGER, -- Example Values: `1999`, `2001`, `2002`, `2000`, `1998` | Value Statics: Total count 2171 - Distinct count 10 - Null count 0
GP_greater_than_0 TEXT, -- Example Values: `no`, `yes` | Value Statics: Total count 2171 - Distinct count 2 - Null coun... |
airline | What is the tail number of the flight with air carrier named Iscargo Hf: ICQ and arrival time of 1000 and below? | tail number refers to TAIL_NUM; Iscargo Hf: ICQ refers to Description = 'Iscargo Hf: ICQ'; arrival time of 1000 and below refers to ARR_TIME < = 1000; | SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ARR_TIME <= 1000 AND T1.Description = 'Iscargo Hf: ICQ' | CREATE TABLE Airlines
(
CANCELLED INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
CRS_DEP_TIME INTEGER, --
CRS_ELAPSED_TIME INTEGER, --
CANCELLATION_CODE TEXT, -- Example Values: `A`, `B`, `C` | Value Statics: Total count 3795 - Distinct count 3 - Nu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.