Dludora/DAIL-BIRD huggingface dataset:
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: Please list the names of all the customers who had ordered the product "Telescoping Adjustable Floor Lamp". "Telescoping Adjustable Floor Lamp" is a product name; names of all the customers refers to "Customer Name" */
SELECT 
SELECT DISTINCT T1.`Customer Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T3.`Product Name` = 'Telescoping Adjustable Floor Lamp'
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: Among the customers who have ordered the product "Telescoping Adjustable Floor Lamp", how many of them are consumers? "Telescoping Adjustable Floor Lamp" is a "Product Name"; consumers refers to Segment = 'Consumer'; */
SELECT 
SELECT COUNT(DISTINCT T1.`Customer Name`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T3.`Product Name` = 'Telescoping Adjustable Floor Lamp' AND T1.Segment = 'Consumer'
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: What was the quantity of Xerox 1952 ordered by Aimee Bixby on 2014/9/10? Xerox 1952 is a "Product Name"; ordered by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; on 2014/9/10 refers to "Order Date" = date('2014-09-10'); */
SELECT 
SELECT SUM(T2.Quantity) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952' AND T2.`Order Date` = '2014-09-10'
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: For how many times has Aimee Bixby ordered the product Xerox 1952? Xerox 1952 is a "Product Name"; Aimee Bixby ordered refers to "Customer Name" = 'Aimee Bixby'; */
SELECT 
SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952'
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: How many art products were ordered in 2013 in the east superstore? ordered in 2013 refers to strftime('%Y', "Order Date") = '2013'; art products refers to "Sub-Category" = 'Art' */
SELECT 
SELECT COUNT(DISTINCT T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Sub-Category` = 'Art' AND T1.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2013'
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: Who is the customer who purchased the largest total cost of products in a single order? largest total cost refers to MAX(SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit)) */
SELECT 
SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T1.`Order ID`, T2.`Customer Name` ORDER BY SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) DESC LIMIT 1
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: What is the name of the product that has the highest original price? has the highest original price refers to MAX(DIVIDE(Sales, SUTRACT(1, discount))); name of the product refers to "Product Name" */
SELECT 
SELECT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` ORDER BY (T1.Sales / (1 - T1.Discount)) DESC LIMIT 1
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: What is the name of the product that was ordered recently by Darren Powers? Darren Powers is the "Customer Name"; name of the product refers to "Product Name"; recently refers to MAX("Order Date") */
SELECT 
SELECT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Darren Powers' ORDER BY T2.`Order Date` DESC LIMIT 1
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: How many quantities of Advantus plastic paper clips were ordered overall? Advantus plastic paper clips is the "Product Name"; */
SELECT 
SELECT SUM(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Advantus Plastic Paper Clips'
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: Which order of Logitech G600 MMO Gaming Mouse has the highest total cost? Logitech G600 MMO Gaming Mouse refers to "Product Name"; highest total cost refers to MAX(SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit)) */
SELECT 
SELECT T1.`Order ID` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Logitech G600 MMO Gaming Mouse' GROUP BY T1.`Order ID` ORDER BY SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) DESC LIMIT 1
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: What are the names of the products that were ordered by Alejandro Grove? ordered by Alejandro Grove refers to "Customer Name" = 'Alejandro Grove'; names of the products refers to "Product Name" */
SELECT 
SELECT DISTINCT T3.`Product Name` FROM west_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` = 'Alejandro Grove'
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: How many customers in Chicago ordered at least 10 Cardinal EasyOpen D-Ring Binders in a single order? at least 10 goods refers to Quantity > = 14; Cardinal EasyOpen D-Ring Binders refers to "Product Name"; customers in Chicago refers to City = 'Chicago' */
SELECT 
SELECT COUNT(DISTINCT T1.`Customer ID`) FROM west_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` = 'Cardinal EasyOpen D-Ring Binders' AND T2.City = 'Chicago' AND T1.Quantity > 10
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: What are the names of the products with a profit of no less than 1,000 in one single order? profit of no less than 1,000 refers to Profit > = 1000; names of the products refers to "Product Name" */
SELECT 
SELECT DISTINCT T2.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Profit > 1000
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: Name 10 products that were shipped first class from the East region. shipped first class refers to "Ship Mode" = 'First Class'; Region = 'East' */
SELECT 
SELECT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'First Class' AND T2.Region = 'East' LIMIT 10
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: List the products ordered by Becky Martin around the Central region. ordered by Becky Martin refers to "Customer Name" = 'Becky Martin'; Region = 'Central'; products refers to "Product Name" */
SELECT 
SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Becky Martin' AND T3.Region = 'Central'
/* Given the following database schema: */
CREATE TABLE people
(
    "Customer ID"   TEXT,
    "Customer Name" TEXT,
    Segment         TEXT,
    Country         TEXT,
    City            TEXT,
    State           TEXT,
    "Postal Code"   INTEGER,
    Region          TEXT,
    primary key ("Customer ID", Region)
)

CREATE TABLE product
(
    "Product ID"   TEXT,
    "Product Name" TEXT,
    Category       TEXT,
    "Sub-Category" TEXT,
    Region         TEXT,
    primary key ("Product ID", Region)
)

CREATE TABLE central_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE east_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE south_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

CREATE TABLE west_superstore
(
    "Row ID"      INTEGER
            primary key,
    "Order ID"    TEXT,
    "Order Date"  DATE,
    "Ship Date"   DATE,
    "Ship Mode"   TEXT,
    "Customer ID" TEXT,
    Region        TEXT,
    "Product ID"  TEXT,
    Sales         REAL,
    Quantity      INTEGER,
    Discount      REAL,
    Profit        REAL,
    foreign key ("Customer ID", Region) references people("Customer ID",Region),
    foreign key ("Product ID", Region) references product("Product ID",Region)
)

/* Answer the following: List 5 customers in the West region who had their item shipped 'Second Class.' shipped 'Second Class.' refers to "Ship Mode" = 'Second Class'; customers refers to "Customer Name"; Region = 'West' */
SELECT 
SELECT DISTINCT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'West' AND T1.`Ship Mode` = 'Second Class' LIMIT 5