zpencerTop Sweeps
Updated 2022-11-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
›
⌄
with buyers as (
select
project_name,
nft_address,
buyer_address,
count(*) bought,
avg(price_USD) avgPriceUSD,
sum(price_USD) totalUSD
from ethereum.core.ez_nft_sales
where block_timestamp::date >= GETDATE()::DATE - 7
group by project_name, nft_address, buyer_address
),
agg as (
select *,
RANK() OVER(PARTITION BY project_name, nft_address ORDER BY bought desc) as rank
from buyers
)
select *
from agg
where 1=1
-- and buyer_address not in ('0xf896527c49b44aAb3Cf22aE356Fa3AF8E331F280')
and rank <= 3
and bought > 10
and avgPriceUSD > 100
order by bought desc
Run a query to Download Data