0-MIDfirst action by new osmosis users
Updated 2023-04-13
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
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with tab1 as (
select min(BLOCK_TIMESTAMP)as min_date
,TX_FROM
from osmosis.core.fact_transactions
group by 2),
tab2 as (
select BLOCK_TIMESTAMP as min_swap_date
,TRADER
from osmosis.core.fact_swaps
group by 1,2),
tab3 as (
select BLOCK_TIMESTAMP as min_lp_date
,LIQUIDITY_PROVIDER_ADDRESS
from osmosis.core.fact_liquidity_provider_actions
group by 1,2),
tab4 as (
select BLOCK_TIMESTAMP as st_date
,TX_CALLER_ADDRESS
from osmosis.core.fact_staking
group by 1,2),
tab5 as (
select BLOCK_TIMESTAMP as tr_date
,SENDER
from osmosis.core.fact_transfers
group by 1,2)
select 'SWAP' as action
, count(distinct TRADER)as user
from tab1
left join tab2
on tab1.TX_FROM=tab2.TRADER
and min_date=min_swap_date
WHERE NOT tx_from is NULL
group by 1
union ALL
select 'LP' as action
,count(distinct LIQUIDITY_PROVIDER_ADDRESS)as user
Run a query to Download Data