tkvresearchNFTs I %
Updated 2023-12-12
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
AA as(
select block_timestamp, event_type, platform_name, price_usd as volume from ethereum.nft.ez_nft_sales union all
select block_timestamp, event_type, platform_name, price_usd as volume from arbitrum.nft.ez_nft_sales union all
select block_timestamp, event_type, platform_name, price_usd as volume from optimism.nft.ez_nft_sales union all
select block_timestamp, event_type, platform_name, price_usd as volume from base.nft.ez_nft_sales union all
select block_timestamp, event_type, platform_name, price_usd as volume from avalanche.nft.ez_nft_sales union all
select block_timestamp, event_type, platform_name, price_usd as volume from bsc.nft.ez_nft_sales union all
select block_timestamp, event_type, platform_name, price_usd as volume from polygon.nft.ez_nft_sales
),
A as( select case when platform_name in ('blur','opensea') then platform_name else 'other' end as protocol,
sum(volume) as volume
from AA
where date(block_timestamp) BETWEEN '2022-12-18' and '2023-12-12'
group by 1),
B as( select case when platform_name in ('blur','opensea') then platform_name else 'other' end as protocol,
sum(volume) as volume
from AA
where date(block_timestamp) BETWEEN '2021-12-18' and '2022-12-18'
group by 1),
C as(
select a.protocol,
a.volume as volume_2023, a.volume / sum(a.volume) over() as rate_2023,
b.volume as volume_2022, b.volume / sum(b.volume) over() as rate_2022
from A as a
join B as b on a.protocol = b.protocol)
Run a query to Download Data