binhachonUntitled Query
Updated 2022-05-22
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
›
⌄
--with borrow_repay_transactions as (
select
block_timestamp,
tx_hash,
event_inputs:from::string as from_address,
event_inputs:to::string as to_address,
contract_address,
event_inputs:amount::float/1e18 as amount
from flipside_prod_db.ethereum_core.fact_event_logs
where event_name = 'LogBorrow'
and contract_address = '0x77f3a4fa35bac0ea6cfac69037ac4d3a757240a1'
and amount > 0
union all
select
block_timestamp,
tx_hash,
event_inputs:from::string as from_address,
event_inputs:to::string as to_address,
contract_address,
-event_inputs:amount::float/1e18 as amount
from flipside_prod_db.ethereum_core.fact_event_logs
where event_name = 'LogRepay'
and contract_address = '0x77f3a4fa35bac0ea6cfac69037ac4d3a757240a1'
and amount < 0
Run a query to Download Data