with deployments as
(
select BLOCK_TIMESTAMP, tx_id
from solana.core.fact_events
where program_id = 'BPFLoaderUpgradeab1e11111111111111111111111'
and solana.core.fact_events.SUCCEEDED = TRUE
and event_type = 'deployWithMaxDataLen'
and solana.core.fact_events.BLOCK_TIMESTAMP is not NUll
and date_trunc('day', block_timestamp) > '2022-10-31'
)
select date_trunc('week', deployments.BLOCK_TIMESTAMP) as date, COUNT(DISTINCT(signers[0])) unique_deployers, count(*) deployment_count
from deployments
join solana.core.fact_transactions on deployments.tx_id = solana.core.fact_transactions.tx_id
group by 1
order by 1 DESC