winnie-fssparkling-silver
Updated 2024-09-18
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 eth_pools AS (
select
'ethereum' as chain,
pool_address, pool_name,
case
when pool_name LIKE '% 100 %' then 0.0001
when pool_name LIKE '% 500 %' then 0.0005
when pool_name LIKE '% 3000 %' then 0.003
when pool_name LIKE '% 10000 %' then 0.01
end as fee_tier,
tokens:token0::VARCHAR as token0,
symbols:token0::VARCHAR as symbol0,
tokens:token1::VARCHAR as token1,
symbols:token1::VARCHAR as symbol1
from ethereum.defi.dim_dex_liquidity_pools
where platform = 'uniswap-v3'
and POOL_NAME ILIKE '%ETH%'
and POOL_NAME ILIKE '%USDC%'
and (
tokens:token0 = lower('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')
OR tokens:token1 = lower('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')
)
and (
tokens:token0 = lower('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2')
OR tokens:token1 = lower('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2')
)
),
eth_trades AS (
select
chain,
block_number,
block_timestamp,
tx_hash,
pool_address,
fee_tier,
QueryRunArchived: QueryRun has been archived