zakkisyed#3 Polygon NFT: Top 100 buyers of the day
Updated 2022-07-16
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 polygon_nft_sales as (
select
block_timestamp,
tx_hash,
matic_value,
event_inputs :
from
as seller,
event_inputs : to as buyer,
event_inputs : tokenId as token_id,
contract_address as nft_collection
from
polygon.core.fact_event_logs logs
join polygon.core.fact_transactions transactions using(tx_hash)
where
event_inputs : tokenId is not null
and event_inputs :
from
!= '0x0000000000000000000000000000000000000000'
and event_inputs : to != '0x0000000000000000000000000000000000000000'
and matic_value > 0
and tx_status = 'SUCCESS'
and event_name = 'Transfer'
and block_timestamp :: date <= current_date - 1
)
select
buyer as buyer,
count(distinct tx_hash) as "Number of NFT Sales",
sum(matic_value) as "Volume of NFT Sales (MATIC)"
from
polygon_nft_sales
group by
1
order by
2 desc
limit
Run a query to Download Data