binhachonFLOOR Tokens - #1
Updated 2022-07-02
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with stake_unstake as (
select
block_timestamp,
case when origin_function_signature = '0xd866c9d8' then 'Stake' else 'Unstake' end as type,
case when type = 'Stake' then from_address else to_address end as user_address,
raw_amount/1e9 as amount
from ethereum.core.ez_token_transfers
where contract_address = lower('0xf59257E961883636290411c11ec5Ae622d19455e')
and block_timestamp::date >= getdate() - interval'90 days' --tx_hash in ('0xdd402385fd9b70a5e9e112e475a077bad417e70652f7b499e3f474021f9429a8', '0xb9d9a61716a6164f1400ce8d6c9ec6d79143641b1767036df26a19758c2bd997')
and origin_function_signature in ('0x990966d5', '0xd866c9d8')
and from_address != '0x0000000000000000000000000000000000000000'
)
select
date_trunc('day', block_timestamp) as time,
type,
count(distinct user_address) as number_of_users,
sum(amount) as volume
from stake_unstake
group by 1, 2
Run a query to Download Data