MLDZMNEPA15
Updated 2023-02-13
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
›
⌄
with tb2 as (select
RECORDED_HOUR::date as day,
avg(close) as price_token
from solana.core.fact_token_prices_hourly where SYMBOL='SOL'
group by 1),
owner as (
select * from (
SELECT
block_timestamp,
tx_id,
PROJECT_NAME,
x.mint,
purchaser,
SALES_AMOUNT as amount,
row_number() over(PARTITION BY x.mint ORDER BY block_timestamp desc) rn
from solana.core.fact_nft_sales x join tb2 y on x.BLOCK_TIMESTAMP::date=y.day
left join solana.core.dim_nft_metadata z on x.mint=z.mint
where SUCCEEDED='TRUE'
and BLOCK_TIMESTAMP>='2022-01-01'
and SALES_AMOUNT > 0
) where rn = 1 order by block_timestamp desc
)
select
PROJECT_NAME,
count(mint) as bear_owned
from owner
group by PROJECT_NAME having PROJECT_NAME is not null
order by bear_owned desc limit 10
Run a query to Download Data