binhachonTop Kashi Pairs
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
›
⌄
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 = 'LogAddCollateral'
and contract_address = '0x6eafe077df3ad19ade1ce1abdf8bdf2133704f89'
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 = 'LogRemoveCollateral'
and contract_address = '0x6eafe077df3ad19ade1ce1abdf8bdf2133704f89'
)
select
user_address,
sum(amount) as amount
from transactions
group by 1
order by 2