0x015dd9D32C0b2e161dc696Dc088592F4a8999C4dSushi WBTC-WETH Pool Analytics
    Updated 2022-11-03
    -- 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('0xceff51756c56ceffca006cd410b03ffc46dd3a58')
    ),
    -- 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 (