nitsYLDLY inflow and outflow
Updated 2022-05-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with outflow as
(SELECT date(block_timestamp) as day, sum(swap_from_amount) as total_amt,
sum(total_amt) over (order by day) as cumulative_amt, 'outflow' as type
from algorand.swaps
where swap_from_asset_id = '226701642' and date(block_timestamp)>= '2022-01-01'
GROUP by 1 ),
inflow as
(SELECT date(block_timestamp) as day, sum(swap_to_amount) as total_amt,
sum(total_amt) over (order by day) as cumulative_amt, 'inflow' as type
from algorand.swaps
where swap_to_asset_id = '226701642' and date(block_timestamp)>= '2022-01-01'
GROUP by 1 )
SELECT * from outflow
UNION ALL
SELECT * from inflow
limit 1000
Run a query to Download Data