TomoDataArbitrum nfts-1
Updated 2022-08-09Copy 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
›
⌄
with nft as (
select
block_timestamp
, tx_hash
, event_inputs:from as seller
, event_inputs:to as buyer
, event_inputs:tokenId as token_id,amount,amount_usd
-- , contract_address as nft_address
from arbitrum.core.fact_event_logs lg inner join arbitrum.core.ez_eth_transfers tr using(tx_hash)
where
event_inputs:tokenId is not null
and event_inputs:from != '0x0000000000000000000000000000000000000000'
and event_inputs:to !='0x0000000000000000000000000000000000000000'
and tr.block_timestamp >= '2022-06-23'
and tx_status = 'SUCCESS'
and event_name = 'Transfer'
and tr.block_timestamp::date < CURRENT_DATE
-- limit 3
)
select
count(tx_hash) as total_sales,
count(distinct seller) as total_sellers,
count(distinct buyer) as total_buyers,
count(distinct token_id) as total_tokens,
sum(amount) as total_cost_eth,
sum(amount_usd) as total_cost_usd,
avg(amount) as average_sale_price,
max(amount) as highest_sale_price,
min(amount) as lowest_sale_price
from nft
Run a query to Download Data