Skip to content

Instantly share code, notes, and snippets.

@mshakhomirov
Created November 24, 2022 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshakhomirov/e4f11721eb5a3182150df08f25b70d64 to your computer and use it in GitHub Desktop.
Save mshakhomirov/e4f11721eb5a3182150df08f25b70d64 to your computer and use it in GitHub Desktop.
select
date
,user_id
,total_cost
,sum(total_cost) over (partition by date,user_id) as revenue_per_day
from production.payment_transaction
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment