Skip to content

This SQL project query provides a breakdown of weekly revenues and allows for further expansion to include revenue calculations for other months.

Notifications You must be signed in to change notification settings

RaffaelloCroci/Revenue-Breakdown-by-week

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Revenue-Breakdown-by-week

This query provides a breakdown of weekly revenues and allows for further expansion to include revenue calculations for other months.

Explanation:

Step 1: This step defines a common table expression (CTE) named Weekly_Revenues to calculate the weekly revenues. It sums the client_total_cost from the booking_booking table while also determining the week of the year using MOD and date_part functions. It filters the results based on specific conditions.

Step 2: This step calculates the revenue breakdown by month. It retrieves the total weekly revenue for each specified month using subqueries within the SELECT statement. In this example, it calculates the revenue for January (weeks 1-5), February (weeks 6-9), and March (weeks 10-13). You can add similar calculations for other months as needed.

About

This SQL project query provides a breakdown of weekly revenues and allows for further expansion to include revenue calculations for other months.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published