CREATE TABLE Customers
(
    CustomerID       INTEGER
        constraint Customers_pk
            primary key,
    "Customer Names" TEXT
);
Customers
CREATE TABLE Products
(
    ProductID      INTEGER
        constraint Products_pk
            primary key,
    "Product Name" TEXT
);
Products
CREATE TABLE Regions
(
    StateCode TEXT
        constraint Regions_pk
            primary key,
    State     TEXT,
    Region    TEXT
);
Regions
CREATE TABLE "Sales Team"
(
    SalesTeamID  INTEGER
        constraint "Sales Team_pk"
            primary key,
    "Sales Team" TEXT,
    Region       TEXT
);
Sales Team
CREATE TABLE "Store Locations"
(
    StoreID            INTEGER
        constraint "Store Locations_pk"
            primary key,
    "City Name"        TEXT,
    County             TEXT,
    StateCode          TEXT
        constraint "Store Locations_Regions_StateCode_fk"
            references Regions(StateCode),
    State              TEXT,
    Type               TEXT,
    Latitude           REAL,
    Longitude          REAL,
    AreaCode           INTEGER,
    Population         INTEGER,
    "Household Income" INTEGER,
    "Median Income"    INTEGER,
    "Land Area"        INTEGER,
    "Water Area"       INTEGER,
    "Time Zone"        TEXT
);
Store Locations
CREATE TABLE "Sales Orders"
(
    OrderNumber        TEXT
        constraint "Sales Orders_pk"
            primary key,
    "Sales Channel"    TEXT,
    WarehouseCode      TEXT,
    ProcuredDate       TEXT,
    OrderDate          TEXT,
    ShipDate           TEXT,
    DeliveryDate       TEXT,
    CurrencyCode       TEXT,
    _SalesTeamID       INTEGER
        constraint "Sales Orders_Sales Team_SalesTeamID_fk"
            references "Sales Team"(SalesTeamID),
    _CustomerID        INTEGER
        constraint "Sales Orders_Customers_CustomerID_fk"
            references Customers(CustomerID),
    _StoreID           INTEGER
        constraint "Sales Orders_Store Locations_StoreID_fk"
            references "Store Locations"(StoreID),
    _ProductID         INTEGER
        constraint "Sales Orders_Products_ProductID_fk"
            references Products(ProductID),
    "Order Quantity"   INTEGER,
    "Discount Applied" REAL,
    "Unit Price"       TEXT,
    "Unit Cost"        TEXT
);
Sales Orders
original_column_name,column_name,column_description,data_format,value_description
SalesTeamID,SalesTeam ID,unique sales team id,integer,
Sales Team,,sales team names,text,
Region,,the region where the state is located in,text,
Sales Team
original_column_name,column_name,column_description,data_format,value_description
OrderNumber,Order Number,the unique number identifying the order,text,
Sales Channel,,Sales Channel,text," In-Store
 Online
 Distributor
 Wholesale"
WarehouseCode,Warehouse Code,Warehouse Code,text,"commonsense evidence:
if the warehouse code is the same, it means this product is shipped from the same ware house"
ProcuredDate,Procured Date,Procured Date,text,"commonsense evidence:
date: month/date/year, 17--> 2017"
OrderDate,Order Date,Order Date,text,
ShipDate,Ship Date,Ship Date,text,
DeliveryDate,Delivery Date,Delivery Date,text,"commonsense evidence:
the difference ""DeliveryDate - OrderDate"" is smaller, it means faster delivery"
CurrencyCode,Currency Code,Currency Code,text,USD
_SalesTeamID,_Sales Team ID,Sales Team ID,integer,
_CustomerID,_Customer ID,_Customer ID,integer,
_StoreID,_Store ID,_Store ID,integer,
_ProductID,_Product ID,_Product ID,integer,
Order Quantity,,Order Quantity,integer,"commonsense evidence:
1 - 8:
higher means order quantity is higher or customer needs more"
Discount Applied,,Discount Applied,real,"commonsense evidence:
0.2: 20% discount"
Unit Price,,,text,
Unit Cost,,,text,"commonsense evidence:
net profit = Unit Price - Unit Cost"
Sales Orders
original_column_name,column_name,column_description,data_format,value_description
CustomerID,customer id,unique id number indicating which customer,integer,
Customer Names,customer names,the name of the customer,text,
Customers
original_column_name,column_name,column_description,data_format,value_description
StoreID,Store ID,unique store id,integer,
City Name,City Name,City Name,text,
County,,full county name,text,
StateCode,State Code,state code,text,
State,,full state name,text,
Type,,type of the store,text,"City
Town
CDP (customer data platform)
Unified Government
Consolidated Government
Other
Township
Urban County 
Borough
Metropolitan Government"
Latitude,,Latitude,real,
Longitude,,Longitude,real,"commonsense evidence:
coordinates or detailed position: (Latitude, Longitude)"
AreaCode,Area Code,,integer,
Population,,Population,integer,
Household Income,,Household Income,integer,
Median Income,,Median Income,integer,
Land Area,,Land Area,integer,
Water Area,,Water Area,integer,
Time Zone,,Time Zone,text,
Store Locations
original_column_name,column_name,column_description,data_format,value_description
StateCode,state code,the unique code identifying the state,text,
State,,full state name,text,
Region,,the region where the state is located in,text,
Regions
original_column_name,column_name,column_description,data_format,value_description
ProductID,product id,unique id number representing each product,integer,
Product Name,product name,name of the product,text,
Products