Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

select f.

CountryCode,
d.[Market],
PeriodTag,
m.[MarketLong],
sum ((convert(float,f.ValueSales))) as ValueSales
from [eur].[FactNielsenFinal] f
join [eur].[DimNielsenProductHierarchyFinal] d
on f.CountryCode = d.CountryCode
and f.CategoryCode =d.CategoryCode
and TRIM(f.ProductTag) = trim(d.ProductTag)
and f.[ProductHierarchyNumber] =d.[ProductHierarchyNumber]
join [eur].[DimNielsenMarket] m
on m.CtryCatMarketSK=f.CtryCatMarketSK
where f.countrycode='IE' and
f.categorycode='MAO'
and PeriodTag in('P52019')
and m.[MarketLong]='IRELAND HYPERSUPER'
and d.ProductHierarchyNumber in (8)
and d.Total='TOTAL'
and d.Market='MAYONNAISE'
--and d.Company='UNILEVER'
--and d.Level6='DOVE'
--and d.Level7='DOVE'
--and d.Level8='AEROSOL'
--and d.Level9='ANTI-PERSPIRANT (AP)'
--and d.Level10='MALE'
--and d.Level11='MEN+CARE'
--and d.Level12='CLEAN COMFORT'
--and d.Level13='DOVE MEN+CARE APD CLN CMFRT250ML~P00088459'
group by
f.CountryCode,
d.[Market],
PeriodTag,
m.[MarketLong]

select top 10 * from [uki].[vw_PowerBIProductHierarchy]


where [Country Code]='IE'
and [Category Code]='COO'

You might also like