Delamir-60142023-01-22 10:33 PM
    Updated 2023-01-25
    with New_User as (
    select
    'November 2022' as timespan,
    block_timestamp::date as date,
    count(distinct from_address) as users,
    count(distinct tx_hash)as TXs
    from ethereum.core.fact_transactions
    where date >= '2022-11-01' and date < '2022-12-01'
    and to_address = '0x92d6c1e31e14520e676a687f0a93788b716beff5'
    group by 1,2
    UNION
    select
    'December 2022' as timespan,
    block_timestamp::date as date,
    count(distinct from_address) as users,
    count(distinct tx_hash)as TXs
    from ethereum.core.fact_transactions
    where date >= '2022-12-01' and date < '2023-01-01'
    and to_address = '0x92d6c1e31e14520e676a687f0a93788b716beff5'
    group by 1,2
    union
    select
    'January 2023' as timespan,
    block_timestamp::date as date,
    count(distinct from_address) as users,
    count(distinct tx_hash) as TXs
    from ethereum.core.fact_transactions
    where date >= '2023-01-01' and date <= CURRENT_DATE
    and to_address = '0x92d6c1e31e14520e676a687f0a93788b716beff5'
    group by 1,2
    )
    select
    timespan,
    sum (users) as Total_users,
    sum (TXs) as Total_TXs
    from New_User
    Run a query to Download Data