Notes

Data Model

Tables backing Consolidated Sales Dashboard

orders

Fact table of individual orders

ColumnTypeKey
order_id INTEGER PK
customer_id INTEGER FK → customers.customer_id
product_id INTEGER FK → products.product_id
order_date DATE
region VARCHAR
channel VARCHAR
amount DECIMAL
discount DECIMAL
quantity INTEGER

customers

Dimension table of customer accounts

ColumnTypeKey
customer_id INTEGER PK
name VARCHAR
segment VARCHAR

products

Dimension table of products

ColumnTypeKey
product_id INTEGER PK
name VARCHAR
category VARCHAR
product_line VARCHAR