Fact.Sale
Documentation | WideWorldImportersDW |
Schema | Fact |
Name | Sale |
Module | Sale |
Sale fact table (invoiced sales to customers)
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | Sale Key | bigint | Identity | DW key for a row in the Sale fact | ||||
DW key for a row in the Sale fact Identity |
||||||||
2 | City Key | int | Dimension.City | City for this invoice | ||||
City for this invoice References: Dimension.City |
||||||||
3 | Customer Key | int | Dimension.Customer | Customer for this invoice | ||||
Customer for this invoice References: Dimension.Customer |
||||||||
4 | Bill To Customer Key | int | Dimension.Customer | Bill To Customer for this invoice | ||||
Bill To Customer for this invoice References: Dimension.Customer |
||||||||
5 | Stock Item Key | int | Dimension.Stock Item | Stock item for this invoice | ||||
Stock item for this invoice References: Dimension.Stock Item |
||||||||
6 | Invoice Date Key | date | Dimension.Date | Invoice date for this invoice | ||||
Invoice date for this invoice References: Dimension.Date |
||||||||
7 | Delivery Date Key | date | Dimension.Date | Date that these items were delivered | ||||
Date that these items were delivered References: Dimension.Date |
||||||||
8 | Salesperson Key | int | Dimension.Employee | Salesperson for this invoice | ||||
Salesperson for this invoice References: Dimension.Employee |
||||||||
9 | WWI Invoice ID | int | InvoiceID in source system | |||||
InvoiceID in source system |
||||||||
10 | Description | nvarchar(100) | Description of the item supplied (Usually the stock item name but can be overridden) | |||||
Description of the item supplied (Usually the stock item name but can be overridden) |
||||||||
11 | Package | nvarchar(50) | Type of package supplied | |||||
Type of package supplied |
||||||||
12 | Quantity | int | Quantity supplied | |||||
Quantity supplied |
||||||||
13 | Unit Price | decimal(18, 2) | Unit price charged | |||||
Unit price charged |
||||||||
14 | Tax Rate | decimal(18, 3) | Tax rate applied | |||||
Tax rate applied |
||||||||
15 | Total Excluding Tax | decimal(18, 2) | Total amount excluding tax | |||||
Total amount excluding tax |
||||||||
16 | Tax Amount | decimal(18, 2) | Total amount of tax | |||||
Total amount of tax |
||||||||
17 | Profit | decimal(18, 2) | Total amount of profit | |||||
Total amount of profit |
||||||||
18 | Total Including Tax | decimal(18, 2) | Total amount including tax | |||||
Total amount including tax |
||||||||
19 | Total Dry Items | int | Total number of dry items | |||||
Total number of dry items |
||||||||
20 | Total Chiller Items | int | Total number of chiller items | |||||
Total number of chiller items |
||||||||
21 | Lineage Key | int | Lineage Key for the data load for this row | |||||
Lineage Key for the data load for this row |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
Fact.Sale | Dimension.City | Fact.Sale.City Key = Dimension.City.City Key | FK_Fact_Sale_City_Key_Dimension_City Foreign key constraint referencing City.City Key |
|
Fact.Sale.City Key = Dimension.City.City Key Name: FK_Fact_Sale_City_Key_Dimension_CityForeign key constraint referencing City.City Key |
||||
Fact.Sale | Dimension.Customer | Fact.Sale.Customer Key = Dimension.Customer.Customer Key | FK_Fact_Sale_Customer_Key_Dimension_Customer Foreign key constraint referencing Customer.Customer Key |
|
Fact.Sale.Customer Key = Dimension.Customer.Customer Key Name: FK_Fact_Sale_Customer_Key_Dimension_CustomerForeign key constraint referencing Customer.Customer Key |
||||
Fact.Sale | Dimension.Customer | Fact.Sale.Bill To Customer Key = Dimension.Customer.Customer Key | FK_Fact_Sale_Bill_To_Customer_Key_Dimension_Customer Foreign key constraint referencing Customer.Customer Key |
|
Fact.Sale.Bill To Customer Key = Dimension.Customer.Customer Key Name: FK_Fact_Sale_Bill_To_Customer_Key_Dimension_CustomerForeign key constraint referencing Customer.Customer Key |
||||
Fact.Sale | Dimension.Date | Fact.Sale.Delivery Date Key = Dimension.Date.Date | FK_Fact_Sale_Delivery_Date_Key_Dimension_Date Foreign key constraint referencing Date.Date |
|
Fact.Sale.Delivery Date Key = Dimension.Date.Date Name: FK_Fact_Sale_Delivery_Date_Key_Dimension_DateForeign key constraint referencing Date.Date |
||||
Fact.Sale | Dimension.Date | Fact.Sale.Invoice Date Key = Dimension.Date.Date | FK_Fact_Sale_Invoice_Date_Key_Dimension_Date Foreign key constraint referencing Date.Date |
|
Fact.Sale.Invoice Date Key = Dimension.Date.Date Name: FK_Fact_Sale_Invoice_Date_Key_Dimension_DateForeign key constraint referencing Date.Date |
||||
Fact.Sale | Dimension.Employee | Fact.Sale.Salesperson Key = Dimension.Employee.Employee Key | FK_Fact_Sale_Salesperson_Key_Dimension_Employee Foreign key constraint referencing Employee.Employee Key |
|
Fact.Sale.Salesperson Key = Dimension.Employee.Employee Key Name: FK_Fact_Sale_Salesperson_Key_Dimension_EmployeeForeign key constraint referencing Employee.Employee Key |
||||
Fact.Sale | Dimension.Stock Item | Fact.Sale.Stock Item Key = Dimension.Stock Item.Stock Item Key | FK_Fact_Sale_Stock_Item_Key_Dimension_Stock Item Foreign key constraint referencing Stock Item.Stock Item Key |
|
Fact.Sale.Stock Item Key = Dimension.Stock Item.Stock Item Key Name: FK_Fact_Sale_Stock_Item_Key_Dimension_Stock ItemForeign key constraint referencing Stock Item.Stock Item Key |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
PK_Fact_Sale | Sale Key, Invoice Date Key | Primary key (nonclustered) constraint. | |
Primary key (nonclustered) constraint. |
Uses
Exported: 2019-02-04 23:05, Last imported: 2018-08-10 09:59