maybeyonasthor_multipool
Updated 2022-01-11
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 current_providers as (
select * from (
select
from_address as user,
pool_name,
-- lp_action,
sum(
case
when lp_action = 'add_liquidity'
then stake_units
when lp_action = 'remove_liquidity'
then -stake_units
end
) as net_stake_units
from thorchain.liquidity_actions
-- where lp_action = 'add_liquidity'
group by 1,2
)
where
net_stake_units > 0
and user is not null
),
user_pools as (
select
user,
count(distinct pool_name) as pools
from current_providers
group by 1
)
select
pools,
count(distinct user) as no_of_users
from user_pools
group by 1
limit 100
Run a query to Download Data