with deploys as (
select
date_trunc('week', block_timestamp) as week,
count(distinct tx_id) as new_deploys
from terra.core.ez_messages
where message_type = '/cosmwasm.wasm.v1.MsgInstantiateContract'
group by week
)
select
week,
sum(new_deploys) over(order by week) as cumulative_deploys
from deploys