nitsInflow vs Outflow by Tokens
Updated 2022-06-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with inf as
(SELECT date(block_timestamp) as day, symbol, sum(amount) as total_amt,
sum(total_amt) over (partition by symbol order by day) as cumulative_transfer,
sum(amount_usd) as total_amt_usd,
sum(total_amt_usd) over (partition by symbol order by day) as cumulative_transfer_usd,
'inflow' as type
from ethereum.core.ez_token_transfers
where to_address = '0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3'
GROUP by 1,2),
outf as
(SELECT date(block_timestamp) as day, symbol, sum(amount) as total_amt,
sum(total_amt) over (partition by symbol order by day) as cumulative_transfer,
sum(amount_usd) as total_amt_usd,
sum(total_amt_usd) over (partition by symbol order by day) as cumulative_transfer_usd, 'outflow' as type
from ethereum.core.ez_token_transfers
where from_address = '0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3'
GROUP by 1, 2 )
SELECT * from inf
UNION ALL
SELECT * from outf
-- limit 100
Run a query to Download Data