charliemarketplacelivequeryv2-univ3-wbtceth-optimal
    /*
    This query uses Quicknode credentials and livequery v2
    */

    select * from livequery.

    with inputs AS (
    SELECT
    LOWER('0xCBCdF9626bC03E24f779434178A73a0B4bad62eD') as contract_address,
    17733559 as from_block,
    concat('0x',trim(to_char(from_block,'XXXXXXXXXX'))) as hex_block_from,
    17743559 as to_block,
    concat('0x',trim(to_char(to_block,'XXXXXXXXXX'))) as hex_block_to,
    ARRAY_CONSTRUCT(
    '0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67',
    NULL,
    NULL
    ) as event_topic_param
    ),

    pool_details AS (
    select POOL_NAME,
    TOKEN1_SYMBOL,
    TOKEN1_DECIMALS,
    TOKEN0_SYMBOL,
    TOKEN0_DECIMALS,
    ABS(TOKEN1_DECIMALS - TOKEN0_DECIMALS) as decimal_adjustment
    from ethereum.core.dim_dex_liquidity_pools
    where pool_address = (select lower(contract_address) from inputs)
    ),

    create_rpc_request as (
    SELECT
    contract_address,
    from_block,
    to_block,
    Run a query to Download Data