I\'m trying to find how many customers were in the certain purchase stages by date and create a snapshot table. What kind of loop (stored procedure) can achieve this and use