SELECT date(block_timestamp) as day, tx_status,
COUNT(DISTINCT Tx_hash) as total_txs,
count(DISTINCT tx_signer) as total_signers,
count(DISTINCT tx_signer) as total_receivers,
sum(transaction_fee)/pow(10,24) as near_fee,
sum(near_fee) over (partition by tx_status order by day) as cum_fees,
sum(total_txs) over (partition by tx_status order by day) as cum_txs
from near.core.fact_transactions
GROUP by 1, 2