alchemystSwap Events
    Updated 2022-12-07
    WITH pools AS (
    SELECT pool_name,pool_address,token0,token1
    FROM ETHEREUM.CORE.DIM_DEX_LIQUIDITY_POOLS
    WHERE pool_address = LOWER('0x397ff1542f962076d0bfe58ea045ffa2d347aca0')),
    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
    )
    )
    SELECT
    pool_name,
    pool_address,
    token0,
    token1,
    token0.symbol AS token0symbol,
    token1.symbol AS token1symbol,
    token0.decimals AS token0decimals,
    token1.decimals AS token1decimals
    FROM
    pools
    LEFT JOIN decimals AS token0
    ON token0.address = token0
    LEFT JOIN decimals AS token1
    ON token1.address = token1
    Run a query to Download Data