SocioCryptoUntitled Query
    Updated 2022-10-05
    with zipswap as (
    select block_timestamp::date as date,
    count (distinct tx_hash) as Swaps_Count,
    count (distinct origin_from_address) as Swappers_Count
    from optimism.core.fact_event_logs
    where origin_to_address =lower('0xE6Df0BB08e5A97b40B21950a0A51b94c4DbA0Ff6')
    AND event_name ='Swap'
    AND
    group by 1
    order by 1),

    uniswap as (
    select block_timestamp::date as date,
    count (distinct tx_hash) as Swaps_Count,
    count (distinct Origin_from_address) as Swappers_Count,
    sum (swaps_count) over (order by date),
    sum (swappers_count) over (order by date)
    from optimism.core.fact_event_logs
    where origin_to_address in('0xe592427a0aece92de3edee1f18e0157c05861564','0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45')
    and event_name = 'Swap'
    and block_timestamp > CURRENT_DATE - 31
    --and origin_from_address = event_inputs:to
    --and tx_hash = '0x70c495fd53cbf1ef924acf8aeae008da58924458b8735becc5635e865ef91ed5'
    group by 1
    order by 1),

    Vel as (
    select block_timestamp::date as date,
    count (distinct tx_hash) as Swaps_Count,
    count (distinct origin_from_address) as Swappers_Count,
    sum (swaps_count) over (order by date),
    sum (swappers_count) over (order by date)
    from optimism.core.fact_event_logs t1
    where t1.origin_to_address = lower('0xa132DAB612dB5cB9fC9Ac426A0Cc215A3423F9c9')
    and event_name = 'Swap'
    and block_timestamp > CURRENT_DATE - 31
    Run a query to Download Data