KuramaUntitled Query
    Updated 2022-07-12
    with tab1 as (select trunc(block_timestamp, 'day') as date1, to_address from polygon.core.fact_transactions
    where block_timestamp >= '2022-05-01'
    and tx_hash is not null
    group by 1, 2),

    tab2 as (
    select trunc(block_timestamp, 'day') as date2, from_address from polygon.core.fact_transactions
    where block_timestamp >= '2022-05-01'
    and tx_hash is not null
    and (to_date(block_timestamp), from_address) not in (select distinct date1, to_address from tab1)
    group by 1, 2)

    select * from tab2

    select date1, count(distinct(to_address)) as total_to_address, count(distinct(from_address)) as total_from_address
    from tab1
    left join tab2
    on tab1.date1 = tab2.date2
    group by 1
    order by 1 asc

    Run a query to Download Data