LordkingUntitled Query
    Updated 2023-04-14
    select
    block_timestamp::date as DATE,
    CASE WHEN DATE >= '2022-08-05' then 'After Velodrome Exploit' else 'Before Velodrome Exploit' END as PERIOD ,
    '< $10' AS TITLE ,
    count (distinct tx_hash) as TRXS,
    count (distinct origin_from_address) as USERS
    from optimism.velodrome.ez_swaps
    WHERE amount_in_usd < 10 and DATE < '2022-08-05'
    group by 1,2,3
    UNION
    select
    block_timestamp::date as DATE,
    CASE WHEN DATE >= '2022-08-05' then 'After Velodrome Exploit' else 'Before Velodrome Exploit' END as PERIOD ,
    ' $10 - $100' AS TITLE ,
    count (distinct tx_hash) as TRXS,
    count (distinct origin_from_address) as USERS
    from optimism.velodrome.ez_swaps
    WHERE amount_in_usd >= 10 and amount_in_usd < 100 and DATE < '2022-08-05'
    group by 1,2,3
    UNION
    select
    block_timestamp::date as DATE,
    CASE WHEN DATE >= '2022-08-05' then 'After Velodrome Exploit' else 'Before Velodrome Exploit' END as PERIOD ,
    ' $100 - $1000' AS TITLE ,
    count (distinct tx_hash) as TRXS,
    count (distinct origin_from_address) as USERS
    from optimism.velodrome.ez_swaps
    WHERE amount_in_usd >= 100 and amount_in_usd < 1000 and DATE < '2022-08-05'
    group by 1,2,3


    UNION
    Run a query to Download Data