rajsAO Daily New and Returning Users Txs
    Updated 2022-09-06
    SELECT
    date_trunc('day', block_timestamp) as date,
    count(case when nonce = 0 then 1 end) as txs_new_users,
    count(case when nonce > 0 then 1 end) as txs_returning_users,
    count(*) as total_txs,
    avg(count(case when nonce = 0 then 1 end)) over (order by date_trunc('day', block_timestamp) rows between 7 preceding and 1 preceding) as "prior_7_days_avg_txs_new_users",
    sum(count(case when nonce = 0 then 1 end)) over (order by date_trunc('day', block_timestamp)) as cum_txs_new_users
    from arbitrum.core.fact_transactions
    where tx_hash IN
    (
    SELECT
    tx_hash
    from arbitrum.core.fact_event_logs
    where contract_address = '0xfae39ec09730ca0f14262a636d2d7c5539353752'
    and topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    and topics[1] = '0x0000000000000000000000000000000000000000000000000000000000000000'
    )
    group by 1
    order by 1
    Run a query to Download Data