0x015dd9D32C0b2e161dc696Dc088592F4a8999C4dSushi WETH-USDC Pool Analytics
Updated 2022-11-03
999
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
›
⌄
-- get details for relevant pool
WITH pools AS (
SELECT
pool_name,
pool_address,
token0,
token1
FROM
ETHEREUM_CORE.DIM_DEX_LIQUIDITY_POOLS
WHERE
pool_address = LOWER('0x397FF1542f962076d0BFE58eA045FfA2d347ACa0')
),
-- get details for tokens in relevant pool
decimals AS (
SELECT
address,
symbol,
decimals
FROM
ETHEREUM_CORE.DIM_CONTRACTS
WHERE
address = (
SELECT
LOWER(token1)
FROM
pools
)
OR address = (
SELECT
LOWER(token0)
FROM
pools
)
),
-- aggregate pool and token details
pool_token_details AS (
Run a query to Download Data