RayyykUSDC Inflow vs Outflow (Unused)
    Updated 2024-11-02
    with date_range as (select min(date_trunc('week', date_day)) as start_week,
    max(date_trunc('week', date_day)) as end_week
    from optimism.core.dim_dates),

    weeks as (select start_week as week
    from date_range
    union all
    select dateadd(week, 1, week)
    from weeks
    join date_range on weeks.week < date_range.end_week),

    assets AS (select distinct symbol,
    contract_address
    from (select symbol, contract_address from gnosis.core.ez_token_transfers
    where to_address = '0xb0e3175341794d1dc8e5f02a02f9d26989ebedb3'
    and symbol not ilike 'Visit%'
    and symbol not ilike 'Earn%'
    and symbol not ilike 'Claim%'
    union
    select symbol, contract_address
    from gnosis.core.ez_token_transfers
    where from_address = '0xb0e3175341794d1dc8e5f02a02f9d26989ebedb3'
    and symbol not ilike 'Visit%'
    and symbol not ilike 'Earn%'
    and symbol not ilike 'Claim%'
    union
    select 'XDAI' as symbol, null as contract_address) all_assets),

    complete_weeks_assets AS (select week,
    symbol,
    contract_address
    from weeks b
    cross join assets a),

    inflow_tokens as (select date_trunc('week', block_timestamp) as week,
    symbol,
    Auto-refreshes every 24 hours
    QueryRunArchived: QueryRun has been archived