datavortexTop buyers and sellers by volume
Updated 2024-10-07
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 BuyerVolume AS (
SELECT
buyer_address AS "buyer address",
SUM(price_usd) AS "buyer volume"
FROM
arbitrum.nft.ez_nft_sales
WHERE
block_timestamp >= CURRENT_TIMESTAMP - INTERVAL '30 DAY'
GROUP BY
buyer_address
ORDER BY
"buyer volume" DESC
LIMIT
5
), SellerVolume AS (
SELECT
seller_address AS "seller address",
SUM(price_usd) AS "seller volume"
FROM
arbitrum.nft.ez_nft_sales
WHERE
block_timestamp >= CURRENT_TIMESTAMP - INTERVAL '30 DAY'
GROUP BY
seller_address
ORDER BY
"seller volume" DESC
LIMIT
5
)
SELECT
'Top Buyers by Volume' AS category,
NULL AS "seller address",
"buyer address",
CASE
WHEN "buyer volume" >= 1e9 THEN TO_CHAR(ROUND("buyer volume" / 1e9, 2)) || 'B'
WHEN "buyer volume" >= 1e6 THEN TO_CHAR(ROUND("buyer volume" / 1e6, 2)) || 'M'