WITH block AS (SELECT address, created_at FROM algorand.account),
time AS (SELECT block_timestamp, block_id FROM algorand.block WHERE date(block_timestamp) BETWEEN '2022-05-02' AND '2022-05-07'),
wallets AS (SELECT * FROM block JOIN time on created_at = block_id)
SELECT date(block_timestamp) as date, COUNT(address) as new_wallets
FROM wallets
GROUP BY date
ORDER BY date