MufasaVolume of sales since July, 2022 based on platform
Updated 2022-09-29Copy Reference Fork
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 opensea as(
select date_trunc('day', block_timestamp) as date, tx_hash, buyer_address, seller_address, NFT_Address, price_usd
from ethereum.core.ez_nft_sales
where 1=1
and platform_name = 'opensea'
and event_type = 'sale'
and block_timestamp >= '2022-07-01'
),
ethereum_price_usd as(
select date_trunc('day', hour) as date, avg(price) as avg_eth_price
from
ethereum.core.fact_hourly_token_prices
where 1=1
and symbol = 'WETH'
group by date
), quix as(
select date_trunc('day', block_timestamp) as date, tx_hash, origin_from_address as from_address,
event_inputs:from as seller, contract_address as nft_address
from optimism.core.fact_event_logs
where origin_to_address in ('0x3f9da045b0f77d707ea4061110339c4ea8ecfa70',
'0x20975da6eb930d592b9d78f451a9156db5e4c77b',
'0x065e8a87b8f11aed6facf9447abe5e8c5d7502b6',
'0x998ef16ea4111094eb5ee72fc2c6f4e6e8647666')
and event_name = 'Transfer'
and event_removed = false
and event_inputs:to = origin_from_address
and block_timestamp >= '2022-07-01'
), last_quix as(
select quix.*, txn.eth_value*price.avg_eth_price as price_usd
from quix
inner join optimism.core.fact_transactions txn on quix.tx_hash = txn.tx_hash
inner join ethereum_price_usd price on quix.date = price.date
), solana_data as(
select date_trunc('day', block_timestamp) as date, sum(swap_from_amount) as swap_from, sum(swap_to_amount) as swap_to,
swap_to/swap_from as swap_amount
FROM
Run a query to Download Data