TomoDataFloor * 2
Updated 2022-07-11Copy Reference Fork
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
31
32
33
34
35
36
›
⌄
select
'staking' as action,
date_trunc (day,BLOCK_TIMESTAMP) AS days ,
sum (RAW_AMOUNT)/1e9 as volume,
sum(volume)over(order by days) as volume_growth
from
ethereum.core.fact_token_transfers
where
ORIGIN_FUNCTION_SIGNATURE = '0xd866c9d8'
and
CONTRACT_ADDRESS = lower('0xf59257E961883636290411c11ec5Ae622d19455e')
and days >= current_date - interval '3 months'
group by days
union all
select
'REWARDS' as action,
date_trunc (day,BLOCK_TIMESTAMP) AS days ,
-- count (distinct tx_hash) as tx_count,
-- count (distinct ORIGIN_FROM_ADDRESS) as wallet_count,
sum (RAW_AMOUNT)/1e9 as volume,
sum(volume)over(order by days) as volume_growth
from
ethereum.core.fact_token_transfers
where
ORIGIN_FUNCTION_SIGNATURE = '0xaf14052c'
and
CONTRACT_ADDRESS = lower('0xf59257E961883636290411c11ec5Ae622d19455e')
and days >= current_date - interval '3 months'
group by days
union all
select
'unstaking' as action,
date_trunc (day,BLOCK_TIMESTAMP) AS days ,
Run a query to Download Data