mucrypto2023-04-27 09:30 PM
    Updated 2023-04-27
    with pools as (select
    pool_name,
    pool_address,
    token0,
    token1
    from ethereum.core.dim_dex_liquidity_pools
    where pool_address = lower('0x99ac8ca7087fa4a2a1fb6357269965a2014abc35')),

    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)),

    pool_token_details as (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