vendettaDaily and Cumulative BTC.b Bridged by Day copy
Updated 2023-02-17
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
›
⌄
-- forked from f821caf3-79a1-4c89-b3ca-6e7f4a01a162
--darvishi
with mint_table as (
select
block_timestamp, tx_hash, event_inputs:value::number/power(10,8) as mint_amount, event_inputs:to as to_address
from
avalanche.core.fact_event_logs
where
tx_status='SUCCESS'
and event_name='Transfer'
and
origin_function_signature='0xa888d914'
and to_address not in ('0x621fa9c13aea2796209498f1327a9f1ca7eabd9e')
),
mint2 as (
select
date(block_timestamp) as day, sum(mint_amount) as daily_minted
from mint_table
group by day
)
select *
,sum(daily_minted) over (partition by null order by day asc rows unbounded preceding) as cumulative_mint
from mint2
Run a query to Download Data