davidwallUntitled Query
    Updated 2023-01-14
    --credit : https://app.flipsidecrypto.com/velocity/queries/e55dc0a8-5f4b-430b-a76c-6fe146393bc7
    select 'Ethereum' as chain,
    mindate::date as date,
    case when date >= '2022-12-24' and date < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    count (distinct from_address) as new_users
    from (
    select from_address,
    min (block_timestamp) as mindate
    from ethereum.core.fact_transactions
    group by 1)
    where mindate::date >= '2022-12-17'
    group by 1,2,3

    union ALL

    select 'Arbitrum' as chain,
    mindate::date as date,
    case when date >= '2022-12-24' and date < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    count (distinct from_address) as new_users
    from (
    select from_address,
    min (block_timestamp) as mindate
    from arbitrum.core.fact_transactions
    group by 1)
    where mindate::date >= '2022-12-17'
    group by 1,2,3

    union ALL

    select 'Avalanche' as chain,
    mindate::date as date,
    case when date >= '2022-12-24' and date < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    count (distinct from_address) as new_users
    Run a query to Download Data