freemartianDaily Unique Users - DAI to L2s
    Updated 2022-06-18
    select count(origin_from_address) as distinct_users, date_trunc('day', block_timestamp::date) as TIME,
    case when event_inputs:chainId = '10' then 'Optimism'
    when event_inputs:chainId = '100' then 'Gnosis'
    when event_inputs:chainId = '137' then 'Polygon'
    when event_inputs:chainId = '42161' then 'arbitrum'
    end as chain
    from ethereum.core.fact_event_logs
    where origin_to_address = lower('0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1')
    and event_name = 'TransferSentToL2'
    and block_timestamp > CURRENT_DATE - 180
    group by TIME, chain
    Run a query to Download Data