davidwallUntitled Query
    Updated 2023-01-14
    --credit : https://app.flipsidecrypto.com/velocity/queries/8752c740-d283-4dcd-95ee-368601512f32
    with maintable as (
    select 'Ethereum' as chain,
    block_timestamp::date as date,
    case when date >= '2022-12-24' and date < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    from_address,
    count (distinct tx_hash) as TX_Count,
    count (distinct from_address) as Users_Count
    from ethereum.core.fact_transactions
    where block_timestamp::date >= '2022-12-17'
    group by 1,2,3,4

    union ALL

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

    union ALL

    select 'Avalanche' as chain,
    block_timestamp::date as date,
    case when date >= '2022-12-24' and date < '2023-01-04' then 'Holidays'
    else 'Other Days' end as timespan,
    from_address,
    count (distinct tx_hash) as TX_Count,
    count (distinct from_address) as Users_Count
    from avalanche.core.fact_transactions
    Run a query to Download Data