yasmin-n-d-r-hevmos pool
Updated 2022-10-26
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 price as (
select
date_trunc('day', recorded_at) as day,
address,
avg(price) as price
from
osmosis.core.dim_prices x
join osmosis.core.dim_labels y on x.symbol = y.project_name
group by
1,
2
),
balances as (
select
x.address as wallet_address,
sum(balance*price/pow(10,decimal)) as balance
from
osmosis.core.fact_daily_balances x
join price b on x.date = b.day
and x.currency = b.address
where
x.date = (
select
max(date)
from
osmosis.core.fact_daily_balances
)
group by
1
),
types as (
select
wallet_address,
case when Balance < 1 then '1.Shimp' when Balance >= 1
and Balance < 10 then '2.Crab' when Balance >= 10
and Balance < 100 then '3.Octopus' when Balance >= 100
Run a query to Download Data