HosseinUntitled Query
    Updated 2022-07-08
    with wallets as (
    select date_trunc('day', block_timestamp) as day, distinct(from_address) as address from polygon.core.fact_transactions
    where status = 'SUCCESS'
    and block_timestamp::date >= '2022-07-01'
    group by day
    UNION

    select date_trunc('day', block_timestamp) as day, distinct(to_address) as address from polygon.core.fact_transactions
    where status = 'SUCCESS'
    and block_timestamp::date >= '2022-07-01'
    group by day
    )

    select day, count(*) as unique_wallets_num from wallets
    group by day
    order by day
    Run a query to Download Data