Popex404FLOW OF LUNA USDC
Updated 2022-12-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
select
'OutFlow' as "Type",
date_trunc('week', block_timestamp) as "Date",
sum(to_amount/pow(10,to_decimal))*-1 as "Volume"
from terra.core.ez_swaps
where pool_id = 'terra1fd68ah02gr2y8ze7tm9te7m70zlmc7vjyyhs6xlhsdmqqcjud4dql4wpxr'
and from_currency = 'uluna'
group by 1,2
union all
select
'Inflow' as "Type",
date_trunc('week', block_timestamp) as "Date",
sum(from_amount/pow(10,from_decimal)) as "Volume"
from terra.core.ez_swaps
where pool_id = 'terra1fd68ah02gr2y8ze7tm9te7m70zlmc7vjyyhs6xlhsdmqqcjud4dql4wpxr'
and to_currency = 'uluna'
group by 1,2