-- Count and plot the number of daily transactions and unique addresses on Polygon, beginning July 1, 2022.
-- In your estimation, discuss whether Polygon is still growing, has reached a plateau, etc.
select
trunc(block_timestamp,'day') as date,
count(distinct tx_hash) as txs,
sum(txs) over (order by date) as cum_txs,
count(distinct from_address) as unique_users,
sum(unique_users) over (order by date) as cum_users
from polygon.core.fact_transactions
where block_timestamp>='2022-07-01'
group by 1
order by 1 asc