adriaparcerisasOsmosis whales 2.4
Updated 2022-06-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
WITH
whales as (
SELECT
distinct delegator_address as user,
sum(case when action='delegate' and currency='uosmo' then amount/pow(10,decimal) else 0 end) as delegated,
sum(case when action='undelegate' and currency='uosmo' then amount/pow(10,decimal) else 0 end) as undelegated,
delegated-undelegated as staked
from osmosis.core.fact_staking
group by 1
)
SELECT
project_name,
--to_currency,
--case when staked >25000 then 'whale'
--else 'everyday user' end as user_type,
count(distinct tx_id) as swaps
FROM osmosis.core.fact_swaps x, whales w, osmosis.core.dim_labels y
WHERE x.trader=w.user and x.to_currency=y.address
and staked>25000
group by 1
order by 2 desc
Run a query to Download Data