Querying Star Schemas

This page serves as a reference for my course “Star Schema Foundations” Module 9 – Querying Star Schemas

Querying a Single Dimension

— everything is just 1 join away

select *
from FactSalesOrderDetail f
join DimProduct p on f.DimProductID = p.DimProductID

 

Querying Multiple Dimensions


select *
from FactSalesOrderDetail f
join DimProduct p on f.DimProductID = p.DimProductID
join DimCustomer c on f.DimCustomerID = c.DimCustomerID
join DimDate d on f.DimDateID = d.DimDateID

 

Creating a View


create view vwSalesDetails as (
select ...
from FactSalesOrderDetail f
join DimProduct p on f.DimProductID = p.DimProductID
join DimCustomer c on f.DimCustomerID = c.DimCustomerID
join DimDate d on f.DimDateID = d.DimDateID
)

Free 5 Day Video Course | Tableau Quick Start

Everything you need to become dangerous :)

x