SalehHODLers vs LPers vs Stakers-IBC
Updated 2022-07-11
999
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 recive as (
select
RECEIVER
,sum(amount /pow(10,decimal)) as amount_in
from osmosis.core.fact_transfers
WHERE block_timestamp::date >='2021-01-01'
and transfer_type = 'OSMOSIS'
and CURRENCY = 'uosmo'
group by 1
order by 1
)
,send as (
select
sender
,sum(amount /pow(10,decimal)) as amount_out
from osmosis.core.fact_transfers
where block_timestamp::date >='2021-01-01'
and CURRENCY = 'uosmo'
and transfer_type = 'OSMOSIS'
group by 1
order by 1
),
Common as (
select sender as wallet , (amount_in - amount_out ) as amount
from recive join send on sender=RECEIVER
group by 1,2 having amount >0
),
holders as (
select RECEIVER as wallet ,
amount_in as amount
from recive
where RECEIVER not in (select sender from send )
UNION
select wallet , amount from Common
)
, lst_holder as (
Run a query to Download Data