Scaricare la presentazione
La presentazione è in caricamento. Aspetta per favore
PubblicatoAnnalisa Di Gregorio Modificato 9 anni fa
1
ANALISI VENDITE MODENA CORPORATION Alfredo Adinolfi Borea, Laura Corsini, Leonardo Drahorad
2
SALES ORDER DETAIL MODELLAZIONE CONCETTUALE E PROGETTAZIONE LOGICA
3
SCHEMA E/R DETAILHeader FK 1 SalesOrderDetailID (1,1) (1,n) ID FK 2 Territory TerritoryID (1,n) (1,1) FK 3 (0,n) (1,1) SpecialOffer Product SpecialOffer FK 5 (1,1) (1,n) ID ProductID FK 4 (0,n) (1,1) Name ProductNumber Product Description SubCategory Category FK 6 (1,1) (1,n) FK 7 (1,1) (1,n) Name DueDate SalesPerson FK 8 (1,1) (1,n) ID Nr
4
DATA PROFILING M INIMALITÀ DELLE C HIAVI SalesOrderDetailID DETAIL FK 1 (1,1) DETAIL FK 1 (1,1) SalesOrderDetailID A LTERNATIVE K EY Territory TerritoryID Name Territory TerritoryID D IPENDENZE FUNZIONALI TerritoryID Name CountryRegionCode Group TerritoryID Name CountryRegionCode Group
5
ALBERO DEGLI ATTRIBUTI
6
SCHEMA DI FATTO G RANULARITÀ : T EMPORALE S ALES P ERSON T ERRITORY
7
GLOSSARIO DELLE MISURE NomeTipoAlimentazioneAggregazioneNon Aggr. ProdottiVendutiNormaleSUM(OrderQty)SUM{ } PrezzoSommaNormaleSUM(UnitPrice)SUM{ } RicavoNormaleSUM(OrderQty*UnitPrice)SUM{ } ScontoSommaNormaleSUM(DiscountPct)SUM{ } PrezzoMedioCalcolata PrezzoSomma /ProdottiVenduti { } ScontoMedioCalcolata ScontoSomma / ProdottiVenduti { } RicavoListinoCalcolata Ricavo / (1 - ScontoMedio) { } ScontoApplicatoCalcolata RicavoListino – Ricavo { }
8
SNOWFLAKE SCHEMA FACT_TABLE Sales Order Detail ProductCode SpecialOffer SalesPerson Territory DueMonth ProdottiVenduti PrezzoSomma ScontoSomma Ricavo DT_Territory Name SalesLastYear SalesYTD CountryRegion DT_CountryRegion CountryRegion Zone DT_Month Month MonthName Year DT_SalesPerson SalesPerson CommissionPct DT_Product ProductCode Name Selling ProductLine Subcategory DT_Subcategory Subcategory Category DT_SpecialOffer SpecialOffer Type Category StartMonth EndMonth D OCUMENTAZIONE : CONVERGENZA SU TERRITORY DA S ALES P ERSON ( SE S ALES P ERSON <> ‘N O -S ALES P ERSON ’)
9
FACT TABLE CREATE VIEW FACT_TABLE AS SELECT Product.ProductNumber as ProductCode, Detail.SpecialOfferID as SpecialOffer, coalesce(cast(Header.SalesPersonID as varchar(14)),'No-SalesPerson’) as SalesPerson, str(year(Header.Duedate),4) +str(month(Header.DueDate),2) as DueMonth, cast(Territory.Name as varchar(50)) as SalesTerritory, SUM(Detail.OrderQty) as ProdottiVenduti, SUM(Detail.UnitPrice) as PrezzoSomma, SUM(Detail.OrderQty * Detail.UnitPrice) as Ricavo, SUM(SpecialOffer.DiscountPct) as ScontoSomma FROM Detail left join Header using (Detail.SalesOrderID) left join SpecialOffer using (SpecialOfferID) left join Territory using (TerritoryID) left join Product using (ProductID) GROUP BY Product.ProductNumber, Detail.SpecialOfferID, Header.SalesPersonID, str(year(Header.Duedate),4) + str(month(Header.DueDate),2), Territory.Name
10
SALES TERRITORY HISTORY MODELLAZIONE CONCETTUALE E PROGETTAZIONE LOGICA
11
SCHEMA E/R TerritoryHistory Territory FK2 StartDate SalesPerson FK1 Employee Person TerritoryID (0,n)(1,1) (0,n) Name LoginID NationalIDNumber OrganizationNode BusinessEntityID EndDate
12
DATA PROFILING M INIMALITÀ DELLE C HIAVI A LTERNATIVE K EY D IPENDENZE FUNZIONALI TerritoryHistor y FK 2 StartDate FK 1 TerritoryHistor y FK 2 StartDate FK 1 Employee LoginID NationalIDNumber OrganizationNode Territory TerritoryID Name Territory Name CountryRegionCode Group Employee JobTitle SalariedFlag SalesPerson Bonus SalesQuota
13
ALBERO DEGLI ATTRIBUTI
14
SCHEMA DI FATTO G RANULARITÀ : T RANSAZIONALE S ALES P ERSON, S NAPSHOT M ONTH T ERRITORY ID
15
GLOSSARIO DELLE MISURE V ENDITORI C OUNT ( DISTINCT S ALES P ERSON ) A GGREGAZIONE : SUM N ON AGGREGABILITÀ : {S NAPSHOT M ONTH } SalesPerson SnapshotMonth TerritoryID COUNT DISTINCT TERRITORY SNAPSHOTMONTH Σ Σ ∅ ∅ ∅
16
SNOWFLAKE SCHEMA FACT_TABLE Sales Territory History VendorIDNumber SnapShotMonth Territory DT_Territory Name SalesLastYear SalesYTD CountryRegion DT_CountryRegion CountryRegion Zone DT_Vendor NationalIDNumber CommissionPct HireYear CurrentFlag Gender BirthYear JobTitle DT_JobTitle JobTitle SalariedFlag Manager DT_SnapShotMonth SnapshotMonth MonthName Year
17
FACT TABLE CREATE VIEW FACT_TABLE AS WITH FACT_TABLE_TEMP AS ( SELECT cast(t.Name as varchar(50)) as Territory, e.NationalIDNumber as VendorIDNumber, s.SnapshotMonth, (select COUNT(*) from STH where STH.TerritoryID = t.TerritoryID and STH.BusinessEntityID = e.BusinessEntityID and CAST(convert(varchar,s.Anno +'-’+convert(varchar,s.Mese) +'-’+convert(varchar,15) as datetime) BETWEEN STH.StartDate AND coalesce(STH.EndDate,getdate()) ) as Attivo FROM Territory t, SalesPerson, SnapshotMonth s, Employee e WHERE SalesPerson.BusinessEntityID = e.BusinessEntityID ) SELECT Territory, VendorIDNumber, SnapshotMonth FROM FACT_TABLE_TEMP WHERE Attivo=1 FACT_TABLE_TEMP Territory VendorIDNumber SnapshotMonth Attivo = {0,1} FACT_TABLE Territory VendorIDNumber SnapshotMonth Attivo = 1 TERRITORY Territory SALESPERSON VendorIDNumber SNAPSHOTMONTH VendorIDNumber ×
18
REPORT BUSINESS OBJECT
19
UNIVERSI S ALES O RDER D ETAIL S ALES T ERRITORY H ISTORY
20
FATTURATO DEI VENDITORI
21
ANALISI ABC
22
REPORT LIVE BUSINESS OBJECT
23
GRAZIE PER L’ATTENZIONE MODENA CORPORATION
24
PREZZO MEDIO DI CATEGORIA Q UESTO REPORT ANALIZZA L ’ ANDAMENTO NEL TEMPO DEI PREZZI DEI TRE TIPI DI BICICLETTE VENDUTI : MOUNTAIN BIKES, BICI DA CORSA E TOURING BIKES. L A CATEGORIA DI ANALISI È MODIFICABILE TRAMITE PROMPT.
25
PROMOZIONI L A TABELLA ANALIZZA I PRODOTTI CHE SONO STATI VENDUTI ASSOCIATI AD UN ’ OFFERTA SPECIALE E QUINDI SCONTATI, CALCOLANDO QUANTO RICAVO SI È PERSO.
Presentazioni simili
© 2024 SlidePlayer.it Inc.
All rights reserved.