-- forked from Unique Txs - Vote and Non-Vote copy @ https://flipsidecrypto.xyz/edit/queries/8a0a28fb-36f6-4308-a448-5661c45a1726
select
'Transactions' as type,
date(block_timestamp) as date,
count(distinct tx_id) as transactions,
AVG(count(distinct tx_id)) OVER (
ORDER BY date
ROWS BETWEEN 6 PRECEDING AND CURRENT ROW
) AS moving_average
from solana.core.fact_transactions
where
date(block_timestamp) between current_date()-61 and current_date()-1
group by date
order by date desc