Alexayquix. sales
Updated 2022-08-04
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
›
⌄
--https://app.flipsidecrypto.com/velocity/queries/02a878d8-6f51-4421-8103-867001f43a0b
with
prices as ( select hour as hourly, 'OP' as symbol, price
from optimism.core.fact_hourly_token_prices
where symbol in ('OP')
union
select hour as hourly, 'ETH' as symbol, price
from ethereum.core.fact_hourly_token_prices
where symbol in ('WETH')),
nft_sales as ( select date_trunc('hour', s.block_timestamp) as hourly, s.nft_address,
case when s.currency_address = '0x4200000000000000000000000000000000000042' then 'OP' else s.currency_address end as symbol,
d.project_name, s.tx_hash, s.seller_address, s.buyer_address, s.price
from optimism.core.ez_nft_sales s
join optimism.core.dim_labels d on
s.nft_address = d.address
where event_type = 'sale' and platform_name = 'quixotic'),
nft_daily as ( select n.hourly, n.symbol, n.project_name, n.tx_hash, buyer_address, (n.price*p.price) as nft_sales_usd
from nft_sales n
left join prices p on
n.hourly = p.hourly and n.symbol = p.symbol)
select count(tx_hash) as units_sold
from nft_daily
Run a query to Download Data