nat_nomadLiquidity pools dunes
    with
    oneinch as (
    select blockchain as blockchain_1inch
    -- , project as dex_1inch
    , project_contract_address as pool_1inch
    , count(*) as exchanges_1inch
    -- , count(distinct tx_hash) as txs_1inch
    -- , collect_set(token_sold_symbol || ' -> ' || token_bought_symbol) as pairs_1inch
    from dex.trades
    where tx_to in (
    '0xe4c577bdec9ce0f6c54f2f82aed5b1913b71ae2f', -- 1inch - exchange v1
    '0x0000000006adbd7c01bc0738cdbfc3932600ad63', -- 1inch - exchange v2
    '0x0000000053d411becdb4a82d8603edc6d8b8b3bc', -- 1inch - exchange v3
    '0x000005edbbc1f258302add96b5e20d3442e5dd89', -- 1inch - exchange v4
    '0x0000000f8ef4be2b7aed6724e893c1b674b9682d', -- 1inch - exchange v5
    '0x111112549cfedf7822eb11fbd8fd485d8a10f93f', -- 1inch - exchange v6
    '0x111111254b08ceeee8ad6ca827de9952d2a46781', -- 1inch - exchange v7
    '0x11111254369792b2ca5d084ab5eea397ca8fa48b', -- 1inch V1 - Aggregation Router V1
    '0x111111125434b319222cdbf8c261674adb56f3ae', -- 1inch V2 - Aggregation Router V2
    '0x11111112542d85b3ef69ae05771c2dccff4faa26', -- 1inch V3 - Aggregation Router V3
    '0x1111111254fb6c44bac0bed2854e76f90643097d', -- 1inch V4 - Aggregation Router V4
    '0x1111111254eeb25477b68fb85ed929f73a960582') -- 1inch V4 - Aggregation Router V5
    and block_time > now() - interval '{{period}}' day
    -- and blockchain = 'ethereum'
    group by blockchain, project_contract_address
    ),

    others as (
    select blockchain as blockchain_other
    , project as dex_other
    , project_contract_address as pool_other
    , count(*) as exchanges_other
    , count(distinct tx_hash) as txs_other
    , collect_set(coalesce(token_sold_symbol, case blockchain
    when 'ethereum' then '<a href="https://etherscan.io/address/'
    when 'bnb' then '<a href="https://bscscan.com/address/'
    Run a query to Download Data