Best Corporate Training & Consulting For Tableau, PowerBI, QlikSense, Python , Data Analytics & Data Science - ML, DL in Gurgaon
Prerequisites To Follow this Exercise :
Once you have the Microsoft SQL Server Express Edition and Python Installed in your system you are Good to Go ahead and follow the below Use Case and Example.
If you prefer watching videos rather than reading blogs , Make Sure to visit our YouTube Channel and Click on Red Button to Subscribe as we plan to post these in Video Form soon. https://www.youtube.com/c/instrovatetechnologies
Computing & Plot Yearly Sales for a Territory in AdventureWorksDW – Python.
Considerations:
The transaction of orders are stored in fact table named FactInternetSales in the Database AdventureWorksDW.
The column SalesAmount in the table FactInternetSales has the sales amount of the order in consideration.
The dimension table DimSalesTerritory has all the details of territories from which orders are being received.
As marked above the column SalesTerritoryKey is the joining column between the fact and dim table FactInternetSales and DimSalesTerritory. The column SalesTerritoryCountry has the country name. For our problem we will take United KIngdom as the territory for yearly sales analysis.
So, our final output which will be having yearly sales of the territory named United Kingdom will be having data from two tables i.e. FactInternetSales and DimSalesTerritory.
So, the sql query to fetch the desired details are as follows :
Year is the sql server inbuilt function to fetch the value of year from the date field. IN the query summation is performed on column SalesAmount of the table FactInternetSales . And hence, using the other columns in the group by clause which are present in select clause.
To learn how to connect python to sql server you can refer to the below Instrovate Technologies Blog:
https://instrovate.com/2019/04/12/how-to-connect-python-with-sql-server/
Below is the python code to solve the problem :
Code Key Points:
https://instrovate.com/forums/topic/plotting-actual-vs-predicted-sales/
After executing the above python program below is the outcome displayed :
3 Days ( 24 Hrs ) Instructor-led trainingIntermediateEnglish We wil be providing you Microsoft Official Course…
2 DaysInstructor-led trainingBeginnerEnglish Skills gained Describe the capabilities and functionality of Dynamics 365 MarketingDescribe the…
5 Days ( 40 Hrs ) Instructor-led trainingIntermediateEnglish We wil be providing you Microsoft Official Course…
5 Days ( 40 Hrs ) Instructor-led trainingIntermediateEnglish We wil be providing you Microsoft Official…
2 DaysInstructor-led trainingBeginnerEnglish Prerequisites No prerequisites for this course Skills gained Describe Microsoft Power Platform…
Course Content Day-1: Power Platform Introduction Power Platform Introduction.Components of Power PlatformConnectors, Triggers & ActionsOverview…
View Comments
Hii how to start this course