with wau as
(
select date_trunc('week', block_timestamp) as week
, count(distinct tx_from) as unique_active_user
, count(distinct tx_id) as transactions_count
from osmosis.core.fact_transactions
where block_timestamp::date >= current_date - (({{PastWeeks}} - 1) * 7)
and tx_status = 'SUCCEEDED'
group by 1
)
select week as "Week"
, unique_active_user as "WAU"
, transactions_count as "WT"
, sum(unique_active_user) over (order by week) as "Cumulative WAU"
, sum(transactions_count) over (order by week) as "Cumulative WT"
from wau
order by 1