with Contracts AS
(SELECT creator_address AS "Address",COUNT(*) AS "Contract deployed",
RANK() OVER (ORDER BY COUNT(*) DESC) AS rank
FROM mezo.testnet.dim_contracts
GROUP BY 1
)
SELECT
COUNT(DISTINCT "Address") AS "Contract Deployer",
SUM ("Contract deployed") AS "Contract Deployed"
FROM Contracts