cloudr3nPolygon NFT Marketplace
Updated 2023-10-31
999
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
polygon_tx as (
-- only contains opensea
select
date(block_timestamp) as day,
sum(price),
sum(price_usd),
platform_name
from
polygon.nft.ez_nft_sales
group by
day, platform_name
),
magic_eden as (
select
date(time_hour) as day,
sum(usdAmount),
platform_name
from (
select
date_trunc('hour',block_timestamp) as time_hour,
case when decoded_log:erc20Token='0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' then '0x0000000000000000000000000000000000001010'
else decoded_log:erc20Token end as erc20Token,
decoded_log:erc20TokenAmount as erc20TokenAmount,
erc20TokenAmount*pow(10,-1*decimals)*price as usdAmount,
'magic eden' as platform_name
from
polygon.core.ez_decoded_event_logs
left join
polygon.price.ez_hourly_token_prices on time_hour=hour and token_address=erc20Token
where
1=1
and event_name='ERC721OrderFilled'
and contract_address='0xdef1c0ded9bec7f1a1670819833240f027b25eff'
)
Run a query to Download Data