I have a fact table as below:
Table Types
TypeId | Name
1 x
2 y
3 z
Table Period:
PeriodId | Date
1 2014-01-31
2 2015-01-31
RowNumber | Value | TypeId | Identifier | PeriodId
1 12 1 cc1 1
2 10 2 cc1 2
3 17 3 cc1 1
.. 30 ... ... ..
.. 60 1 cc2 1
23 2 cc2 2
From these tables I am trying to create a single flatten table as below:
Identifier | periodId | x | y | z
cc1 1 12 10 17
cc1 2 .. .. ..
cc2 1 .. .. ..
How can I query to get the data in the above format?