ramishoowUntitled Query
Updated 2022-10-20
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 ramishow as (
select
block_timestamp,
tx_hash,
seller_address,
buyer_address,
nft_address,
currency_symbol,
price_usd
from optimism.core.ez_nft_sales
where event_type = 'sale'
and block_timestamp::date <= current_date - 1
and price_usd is not null
)
select
nft_address,
case
when nft_address = '0xb8df6cc3050cc02f967db1ee48330ba23276a492' then 'OptiPunk'
when nft_address = '0x0110bb5739a6f82eafc748418e572fc67d854a0f' then 'Early Optimists'
when nft_address = '0x51e5426ede4e2d4c2586371372313b5782387222' then 'Apetimism'
when nft_address = '0x81b30ff521d1feb67ede32db726d95714eb00637' then 'Optimistic Explorer'
when nft_address = '0xdbfeaae58b6da8901a8a40ba0712beb2ee18368e' then 'Hustlers'
when nft_address = '0x5c9d55b78febcc2061715ba4f57ecf8ea2711f2c' then 'Motorheadz'
when nft_address = '0xa95579592078783b409803ddc75bb402c217a924' then 'Introducing the Optimism'
when nft_address = '0x4d40396b4eb19be0c1ce1b9544608068bdf6b0fc' then 'Optimistic Apes'
when nft_address = '0xbf2794adaf7a48a2a24eb344a7ba221a52fe2171' then 'OP Orcas'
when nft_address = '0x9b9f542456ad12796ccb8eb6644f29e3314e68e1' then 'OptiChads'
else nft_address
end as "NFT Collections",
count(distinct tx_hash) as "Number of NFT Sales",
sum(price_usd) as "Total Sales Volume (USD)"
from ramishow
group by nft_address
order by "Total Sales Volume (USD)" desc
limit 5
Run a query to Download Data