Skip to content

Commit

Permalink
add: transactions model
Browse files Browse the repository at this point in the history
  • Loading branch information
ccerv1 authored and wcchang1115 committed May 20, 2024
1 parent 4cf3ac5 commit b7e2073
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
select
events.project_id,
events.event_source as network,
time_intervals.time_interval,
'transaction_count' as metric,
SUM(events.amount) as amount
from {{ ref('int_events_daily_to_project') }} as events
cross join {{ ref('int_time_intervals') }} as time_intervals
where
events.event_type = 'CONTRACT_INVOCATION_SUCCESS_DAILY_COUNT'
and events.bucket_day >= time_intervals.start_date
group by
events.project_id,
events.event_source,
time_intervals.time_interval

0 comments on commit b7e2073

Please sign in to comment.