ngxuan885Citizens of NEAR - 4
    Updated 2022-07-07
    with active_wallets as (
    SELECT TX_SIGNER as wallet, count(DISTINCT TXN_HASH) as tx_counts
    from flipside_prod_db.mdao_near.transactions
    where BLOCK_TIMESTAMP::date >= CURRENT_DATE - 90
    GROUP by 1 having tx_counts >= 15)

    SELECT BLOCK_TIMESTAMP::Date as DATE, count(DISTINCT TXN_HASH) as TXN_HASH_counts , count(DISTINCT TX_SIGNER) as wallets

    from flipside_prod_db.mdao_near.transactions
    where TX_SIGNER in (SELECT wallet from active_wallets)
    and BLOCK_TIMESTAMP::date >= CURRENT_DATE - 90

    GROUP by 1 order by 1
    Run a query to Download Data