P53SQLBeginnerCalculate6 min
Calculate Each Store's Share of Regional Revenue
Compute each store's revenue share inside its region.
#calculate#window-functions#revenue
Scenario
A store_revenue table already has one row per store and region. North stores have revenue 40,000 and 60,000.
Problem statement
Calculate each North store's regional share without joining orders again.
Your Task
- Calculate the two shares.
- Write a window-function expression.
- Explain why the input grain matters.
Related Concepts
Window functionsRevenue shareAggregation grain
Ready to count this problem?
Mark it complete when you have reasoned through the solution in your own words.