Afonso_DiazBy chain
Updated 2024-10-29
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
main as (
select
tx_hash,
block_timestamp,
origin_from_address as swapper,
'Base' as chain,
platform,
iff(token_in = '0x04d5ddf5f3a8939889f11e97f8c4bb48317f1938', amount_in, amount_out) as amount_usd,
greatest(symbol_in, symbol_out) || ' - ' || least(symbol_in, symbol_out) as token_pair,
iff(token_in = '0x04d5ddf5f3a8939889f11e97f8c4bb48317f1938', symbol_out, symbol_in) as symbol
from
base.defi.ez_dex_swaps
where
'0x04d5ddf5f3a8939889f11e97f8c4bb48317f1938' in (token_in, token_out)
union all
select
tx_hash,
block_timestamp,
origin_from_address as swapper,
'Ethereum' as chain,
platform,
iff(token_in = '0xa469b7ee9ee773642b3e93e842e5d9b5baa10067', amount_in, amount_out) as amount_usd,
greatest(symbol_in, symbol_out) || ' - ' || least(symbol_in, symbol_out) as token_pair,
iff(token_in = '0xa469b7ee9ee773642b3e93e842e5d9b5baa10067', symbol_out, symbol_in) as symbol
from
ethereum.defi.ez_dex_swaps
where
'0xa469b7ee9ee773642b3e93e842e5d9b5baa10067' in (token_in, token_out)
union all
QueryRunArchived: QueryRun has been archived