adele23course session 2
Updated 2025-03-05
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
With uniswap AS
(
select
origin_from_address,
tx_hash,
count(distinct tx_hash) as n_swaps
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_purchase
from uniswap
join ethereum.nft.ez_nft_sales nft
ON uniswap.origin_from_address = nft.buyer_address
where nft.block_timestamp :: date >= current_date - 31
group by user
order by n_nft_purchase
limit 100;