mansa$MATIC General approach
Updated 2022-09-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with general as(
SELECT
*
FROM polygon.core.dim_labels a
inner join polygon.core.ez_matic_transfers b
on a.address = b.matic_to_address
WHERE a.address_name LIKE '%staking%'
)
select date_trunc('month',block_timestamp) as month,
sum(amount) as matic_vol,
count(distinct matic_from_address) as staker_count,
count(tx_hash) as stake_count,
sum(amount_usd) as matic_vol_usd,
SUM(matic_vol) OVER (order by month asc rows between unbounded preceding and current row) AS Cummulative_matic_vol,
SUM(staker_count) OVER (order by month asc rows between unbounded preceding and current row) AS Cummulative_staker_count,
SUM(stake_count) OVER (order by month asc rows between unbounded preceding and current row) AS Cummulative_stake_count
from general
group by 1
order by 1
Run a query to Download Data