How To Use SQL To Calculate The Percentage Of A Total and Percentage Of Customer Spend

preview_player
Показать описание
In this short tutorial, I'll cover how we can simply use SQL to calculate the percentage of total customer spend using Partitions & Functions within SQL Server.

Before we dive into SSMS, I'll go through slides to explain our base table and a breakdown of our expected output.

Enjoy!

🤝 Follow my Data content on Twitter:

🤝 I’m also sharing Data knowledge on Instagram:

🤝 Connect with me on LinkedIn:

🤝 View my Website:

#sql #sqlserver
Рекомендации по теме
Комментарии
Автор

If I want to get the percentage based on the customer total and date, how can that be done?
So like I get distribution of total in terms of sum, and percentage for each customer on a given date.

SameerHussain-qkul