WITH New_wallets AS (
SELECT
address
FROM
algorand.account
WHERE
created_at>= 18363444 AND created_at<=18974008 -- 18363444 January first block 18974008 January last block
)
SELECT
count(address) as Number_of_addresses,
asset_id,
asset_name
FROM
algorand.account_asset
WHERE
address IN ( SELECT * from New_wallets )
GROUP BY 2, 3
ORDER BY 1 DESC