Pine Analyticsnotable-ivory copy
Updated 2024-12-09
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
›
⌄
-- forked from notable-ivory @ https://flipsidecrypto.xyz/studio/queries/fdad71c3-9f9d-4999-aa96-f76be2617c4c
with tab1 as (
SELECT tx_hash
FROM base.core.ez_token_transfers
where to_address like lower('0x0b480f79d77524588E29FBdBB3454f66279B16a4')
AND block_timestamp > '2024-12-01'
union all
SELECT tx_hash
FROM base.core.ez_native_transfers
where to_address like lower('0x0b480f79d77524588E29FBdBB3454f66279B16a4')
AND block_timestamp > '2024-12-01'
)
SELECT
count(*) as swaps,
count(DISTINCT ORIGIN_FROM_ADDRESS) as swappers,
sum(case when not AMOUNT_IN_USD is NULL then AMOUNT_IN_USD when not AMOUNT_out_USD is NULL then AMOUNT_out_USD end) as swap_volume_usd
FROM base.defi.ez_dex_swaps
where tx_hash in (SELECT * from tab1)
AND block_timestamp > '2024-12-01'