MrftiTop ten CryptoPunk traders (number of trades)
Updated 2022-08-31Copy 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
buy_tbl as(
WITH
buy_table as(
select date_trunc(hour,block_timestamp) as DATE, tx_hash , buyer_address, price_usd, price as buy_price, tokenid
from ethereum.core.ez_nft_sales
where project_name in ('cryptopunks', 'Wrapped CryptoPunks V1', 'wrapped cryptopunks')
and event_type in ('sale','bid_won')
and buyer_address != '0x0000000000000000000000000000000000000000'
group by block_timestamp, tx_hash, buyer_address, price_usd, price, tokenid
),
eth_price AS
(
select date_trunc(hour,block_timestamp) as DATE2, AVG(AMOUNT_OUT/AMOUNT_IN) as eth_PRICE
FROM ethereum.sushi.ez_swaps
WHERE SYMBOL_IN='WETH' AND SYMBOL_OUT='USDC'
GROUP BY DATE2
)
select buyer_address, sum( buy_price*eth_price) as total_buy_usd, count(DISTINCT tx_hash) as total_buy_no
from buy_table join eth_price on date=date2
group by buyer_address
),
sell_tbl as (
WITH
sell_table as(
select date_trunc(hour,block_timestamp) as DATE, tx_hash , seller_address, price_usd, price as sell_price, tokenid
from ethereum.core.ez_nft_sales
where project_name in ('cryptopunks', 'Wrapped CryptoPunks V1', 'wrapped cryptopunks')
and event_type in ('sale','bid_won')
and seller_address != '0x0000000000000000000000000000000000000000'
group by block_timestamp, tx_hash, seller_address, price_usd, price, tokenid
Run a query to Download Data