takamoriTotal Royalties by Project
Updated 2022-09-28
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
›
⌄
select
nft_address,
project_name,
'hello' as hello,
sum(case when platform_name = 'looksrare' then price end) as LooksRare_NFTs,
sum(case when platform_name = 'opensea' then price end) as OpenSea_NFTs,
sum(case when platform_name = 'x2y2' then price end) as x2y2_NFTs,
sum(case when platform_name = 'sudoswap' then price end) as sudo_NFTs,
sum(case when platform_name not in ('sudoswap','looksrare','opensea','x2y2') then price end) as other_NFTs,
sum(case when platform_name = 'x2y2' and creator_fee_usd = 0 and platform_fee_usd = 0 then price end) as OTC_NFTs,
sum(case when platform_name = 'x2y2' and platform_fee_usd > 1 and creator_fee_usd = 0 then price end) as no_royalty_NFTs,
sum(case when platform_name = 'x2y2' and platform_fee_usd > 1 and creator_fee_usd > 100 then price end) as marketplace_royalty_NFTs,
sum(case when creator_fee_usd/(.00000000000001 + price_usd) > 0.05 then 0.05 * price_usd else creator_fee_usd end)/(.00000000001+sum(price_usd)) as royalty_ratio,
sum(case when platform_fee_usd > 1 then creator_fee_usd end)/(.0000000001+sum(case when platform_fee_usd > 1 then price_usd end)) as royalty_ratio_non_OTC,
sum(platform_fee)/(.00000000001+sum(price)) as fee_ratio,
sum(case when creator_fee/(.00000000000001 + price) > 0.05 then 0.05 * price else creator_fee end) as royalties,
'lets break',
count(case when platform_name = 'looksrare' then price end) as LooksRare_NFTs_count,
count(case when platform_name = 'opensea' then price end) as OpenSea_NFTs_count,
count(case when platform_name = 'x2y2' then price end) as x2y2_NFTs_count,
count(case when platform_name = 'sudoswap' then price end) as sudo_NFTs_count,
count(case when platform_name not in ('sudoswap','looksrare','opensea','x2y2') then price end) as other_NFTs_count,
count(case when platform_name = 'x2y2' and creator_fee_usd = 0 and platform_fee_usd = 0 then price end) as OTC_NFTs_count,
count(case when platform_name = 'x2y2' and platform_fee_usd > 1 and creator_fee_usd = 0 then price end) as no_royalty_NFTs_count,
count(case when platform_name = 'x2y2' and platform_fee_usd > 1 and creator_fee_usd > 100 then price end) as marketplace_royalty_NFTs_count,
sum(case when platform_name = 'sudoswap' then creator_fee end) as sudo_royalties
from ethereum.core.ez_nft_sales
where block_timestamp > '2022-08-25' and price_usd < 500000 and currency_symbol in
('WETH','ETH') --and creator_fee/price > 0.05
Run a query to Download Data