binhachonTop Kashi Pairs (II) - Active users
Updated 2022-05-14
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
›
⌄
with transactions as (
select
block_timestamp,
event_inputs:to::string as user_address,
event_inputs:share::float/1e18 as amount
from flipside_prod_db.ethereum_core.fact_event_logs
where event_name = 'LogAddAsset'
and contract_address = '0x77f3a4fa35bac0ea6cfac69037ac4d3a757240a1'
union all
select
block_timestamp,
event_inputs:from::string as user_address,
-event_inputs:share::float/1e18 as amount
from flipside_prod_db.ethereum_core.fact_event_logs
where event_name = 'LogRemoveAsset'
and contract_address = '0x77f3a4fa35bac0ea6cfac69037ac4d3a757240a1'
),
user_stats as (
select
user_address,
sum(amount) as amount
from transactions
group by 1
)
select
count(*)
from user_stats
where amount > 0
Run a query to Download Data