RamaharBuyers Purchase Maximum price distribution
Updated 2022-10-17
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
›
⌄
-- Earliest date : 2021-12-18 ; Platform:quixotic
with OP as (
select DATE(hour) as dayz,
avg(price) as OP_price
from optimism.core.fact_hourly_token_prices
where symbol = 'OP'
group by 1),
ETH as (
select DATE(hour) as dayz,
avg(price) as ETH_price
from ethereum.core.fact_hourly_token_prices
where symbol = 'WETH'
group by 1),
OPETH as (
select o.dayz,
OP_price/ETH_price as OPETH_price
from OP o
join ETH e on o.dayz = e.dayz
order by 1),
details as (select
case
when currency_symbol = 'ETH' then price
else price * OPETH_price
end as price_ETH,
nft_address,
buyer_address,
price_usd,
tx_hash
from optimism.core.ez_nft_sales s
left join optimism.core.dim_labels ON nft_address = address
left join OPETH o on s.block_timestamp::date = o.dayz
where event_type = 'sale' ),
Run a query to Download Data