Maditokens by source chain
    Updated 2023-02-14
    with
    polygon as (
    select
    BLOCK_TIMESTAMP::date as date,
    'Polygon' as source_chain,
    symbol,
    count(DISTINCT tx_hash) as tx_count
    from
    polygon.core.fact_event_logs a
    join polygon.core.dim_contracts b on a.contract_address = b.address
    and ORIGIN_TO_ADDRESS = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666'
    and BLOCK_TIMESTAMP >= '2023-01-31'
    and BLOCK_TIMESTAMP <= '2023-02-06'
    group by
    1,
    2,
    3
    having
    symbol in ('WMATIC', 'USDT', 'WETH', 'DAI')
    ),
    arbitrum as (
    select
    BLOCK_TIMESTAMP::date as date,
    'Arbitrum' as source_chain,
    symbol,
    count(DISTINCT tx_hash) as tx_count
    from
    arbitrum.core.fact_event_logs a
    join arbitrum.core.dim_contracts b on a.contract_address = b.address
    and ORIGIN_TO_ADDRESS = '0xce16f69375520ab01377ce7b88f5ba8c48f8d666'
    and BLOCK_TIMESTAMP >= '2023-01-31'
    and BLOCK_TIMESTAMP <= '2023-02-06'
    group by
    1,
    2,
    3
    Run a query to Download Data