0-MIDper user lp action stats
Updated 2023-01-11
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with tab1 as (
select ACTION
,LIQUIDITY_PROVIDER_ADDRESS
,case
when BLOCK_TIMESTAMP>='2022-12-11' and BLOCK_TIMESTAMP<'2022-12-25' then 'TWO WEEKS BEFORE HOLIDAYS'
when BLOCK_TIMESTAMP>='2022-12-25' and BLOCK_TIMESTAMP<='2023-01-07' then 'DURING THE HOLIDAYS' end as time_status
,count(distinct TX_ID) as "ACTION COUNT"
,sum(AMOUNT/1e6) as "ACTION AMOUNT"
from terra.core.fact_lp_actions
where CURRENCY='uluna'
and TX_SUCCEEDED='TRUE'
and BLOCK_TIMESTAMP>='2022-12-11' and BLOCK_TIMESTAMP<='2023-01-07'
group by 1,2,3)
select ACTION,time_status
,avg("ACTION COUNT") as "ACTION COUNT"
,avg("ACTION AMOUNT") as "ACTION AMOUNT"
from tab1
group by 1,2
Run a query to Download Data