amirrzHyperActive Users
Updated 2022-10-17Copy Reference Fork
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
activeuserst1 as (
select
date_trunc (week,block_timestamp) as Week,
tx_from,
count(distinct block_timestamp::date) as Days_Count
from
osmosis.core.fact_transactions
where
tx_status = 'SUCCEEDED' group by 1,2),
table1 as ( select
tx_from as Active_Users
from
activeuserst1
where
days_count >= 5 group by 1 having count (distinct week) >= 68)
select
'Swap' as Action_Type,
count(distinct tx_id) as TX_Count,
count(distinct trader) as Users_Count
from
osmosis.core.fact_swaps
where
tx_status = 'SUCCEEDED'
and
trader in (select active_users from table1)
union ALL
select
'Liquidity Providing' as Action_Type,
count(distinct tx_id) as TX_Count,
count (distinct liquidity_provider_address) as Users_Count
from
osmosis.core.fact_liquidity_provider_actions
where
tx_status = 'SUCCEEDED'
and
Run a query to Download Data