scottincryptostMATIC Swap Volume
    Updated 2022-10-10
    select
    date_trunc(day, block_timestamp) as block_day
    -- , '0x65752c54d9102bdfd69d351e1838a1be83c924c6' as pool_token
    , 'Quickswap WMATIC/stMATIC' as description
    , sum(event_inputs:amount1In::int) / 1e18 + sum(event_inputs:amount1Out::int) / 1e18 as stmatic_swap_amt
    from polygon.core.fact_event_logs
    where 1=1
    and contract_address = '0x65752c54d9102bdfd69d351e1838a1be83c924c6' -- 'Quickswap WMATIC/stMATIC'
    and event_name = 'Swap'
    and block_day >= '2022-10-01'
    -- and block_day < '{end_date}'
    group by block_day

    union all

    select
    date_trunc(day, block_timestamp) as block_day
    , 'DystopiaSwap WMATIC/stMATIC' as description
    , sum(event_inputs:amount1In::int) / 1e18 + sum(event_inputs:amount1Out::int) / 1e18 as stmatic_swap_amt
    from polygon.core.fact_event_logs
    where 1=1
    and contract_address = '0x1237fea0b26f68191d50900bffd85e142697c423' -- 'DystopiaSwap WMATIC/stMATIC'
    and event_name = 'Swap'
    and block_day >= '2022-10-01'
    -- and block_day < '{end_date}'
    group by block_day

    union all

    select
    date_trunc(day, block_timestamp) as block_day
    , 'Uniswap WMATIC/stMATIC' as description
    , sum(abs(event_inputs:amount1::int)) / 1e18 as stmatic_swap_amt
    from polygon.core.fact_event_logs
    where 1=1
    and contract_address = '0x59db5ea66958b19641b6891fc373b44b567ea15c' -- 'Uniswap WMATIC/stMATIC'
    Run a query to Download Data