MufasaUser activity stats in Near on daily basis over the previous week(Between current_date - 14 and current_date - 7)
    Updated 2023-01-17
    with user_activity as (
    select to_date(block_timestamp) as date,
    sum(TRANSACTION_FEE/pow(10,24)) as fee_volume,
    avg(TRANSACTION_FEE/pow(10,24)) as avg_fee_volume,
    count(distinct tx_signer) as total_users_count,
    count (DISTINCT TX_HASH) as total_txns_count,
    count(DISTINCT TX_RECEIVER) as total_smart_contracts_count,
    sum(GAS_USED/1e18) as gas_volume,
    Avg(GAS_USED/1e18) as avg_gas_volume,
    total_txns_count/(COUNT(DISTINCT to_date(block_timestamp))*24) as hour_txns,
    total_txns_count/(COUNT(DISTINCT to_date(block_timestamp))*24*60) as min_txns,
    total_txns_count/(COUNT(DISTINCT to_date(block_timestamp))*24*60*60) as sec_txns
    from near.core.fact_transactions
    where tx_status = 'Success' and block_timestamp >= current_date - 14 and block_timestamp <= current_date - 7
    group by date
    )
    select * from user_activity
    Run a query to Download Data