Simple Star schema question

View previous topic View next topic Go down

Simple Star schema question

Post  BI Consultant on Wed Aug 31, 2011 7:56 pm

To al gurus:
I guess this is a simple question, but for some reason I'm having difficulty getting my arms around this.
I'll explain it in a simplified fashion keeping out most dimensions and facts:

Imagine the following one dimension table and one fact table:

Dimension Customer, showing rows below:
Customer_Key (PK), Customer_Code, Customer_Name, Master_Customer
1, SHT, Shell Technology, SHELL
2, SHM, Shell Marketing, SHELL
3, SHP, Shell Products, SHELL

My Fact Table has the following rows:
Customer_Key (FK), Revenue
1, $3M
2, $4M
3, $5M

If I want to view Total Revenue for Master Customer SHELL, will my query return the total if all these three rows (i.e. $12M)? I guess I'm struggling whether to add a Master Customer Code or not.

Simple question, but I've had a long day and my brain's fried!

Thanks for answering!

BI Consultant

Posts : 18
Join date : 2011-08-09

View user profile

Back to top Go down

Re: Simple Star schema question

Post  ngalemmo on Wed Aug 31, 2011 8:48 pm

Well, when you get up in the morning, think about how the query would need to be written with or without the master customer column.
avatar
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

View user profile http://aginity.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum