Moe31 Optimism open
    Updated 2022-08-19
    select
    date(BLOCK_TIMESTAMP) as days,
    -1*count (distinct tx_hash) as num_txs,
    -1*count(ORIGIN_FROM_ADDRESS) as num_wallets,
    'Borrow' as type
    from optimism.core.fact_event_logs
    where EVENT_NAME ilike 'borrow'
    group by 1
    union all
    select
    date(BLOCK_TIMESTAMP) as days,
    count (distinct tx_hash) as num_txs,
    count(ORIGIN_FROM_ADDRESS) as num_wallets,
    'Repay' as type
    from optimism.core.fact_event_logs
    where EVENT_NAME ilike '%Repay%'
    group by 1
    Run a query to Download Data