permaryDEX SWAPS
Updated 2024-09-24
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 uniswap AS
(
SELECT
origin_from_address,
tx_hash,
FROM ethereum.defi.ez_dex_swaps
WHERE block_timestamp :: date >= current_date - 31
AND
platform IN ('uniswap-v2','uniswap-v3')
)
SELECT uniswap.origin_from_address AS user,
count (DISTINCT uniswap.tx_hash) AS n_swaps,
count (DISTINCT nft.tx_hash) AS n_nft_purchases
FROM uniswap
JOIN ethereum.nft.ez_nft_sales AS nft
ON uniswap.origin_from_address = nft.buyer_address
WHERE nft.block_timestamp:: date >= current_date - 31
GROUP BY user
ORDER BY n_nft_purchases DESC
LIMIT 100;
--(
--SELECT
--platform,
--count(DISTINCT tx_hash) AS n_swaps
QueryRunArchived: QueryRun has been archived