Updated 2022-10-06
    with base12 as (select tx_hash
    from ethereum.core.fact_event_logs
    where event_name = 'Swap'
    and block_timestamp >= '2022-08-15'
    and tx_status = 'SUCCESS'),

    base13 as (select block_timestamp,
    event_inputs:from as swapper,
    event_inputs:value/1e6 as swap_size
    from ethereum.core.fact_event_logs
    where contract_address ilike '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
    and event_name = 'Transfer'
    and tx_hash in (select tx_hash from base12)
    and event_inputs:value > 0
    and swap_size < 99999999
    and tx_status = 'SUCCESS')

    select
    date_trunc('day', block_timestamp) as day,
    case
    when day < '2022-09-05' then 'Before Annoucement'
    when day = '2022-09-05' then 'Binance USDC Conversion Annoucement'
    when day > '2022-09-05' and day <= '2022-09-28' then 'Between Announcement and Implementation'
    when day = '2022-09-29' then 'Binance USDC Conversion Implementation'
    else 'After Implementation'
    end as periods,
    count(distinct(swapper)),
    sum(swap_size),
    'Ethereum'
    from base13
    group by 1
    Run a query to Download Data