Trying to take 3.8MM records and break them up into 3 groups.
Group 1 : 0 - 160,000 (already done) Group 2: 160,001 - 960,000 Group 3: 960,001 - 3,610,000
They need to be ordered by when they were actually created via the attribute [Created_At]
For the first group, it was pretty easy (and the last group should be rather easy too. But the middle is the challenge. Here's what I did for group A
SELECT TOP(160000) * FROM ENT.[USERS] ORDER BY Created_At DESC
I have a data guy on my end that proposed this (but SFMC doesn't like it - requires SELECT function to be first)
WITH OrderedUsers AS ( SELECT *, -- this won't work; you'll have to list out what you want ROW_NUMBER() OVER (ORDER BY Created_At) AS 'RowNumber' FROM ENT.[Users] ) SELECT * FROM OrderedUsers WHERE RowNumber BETWEEN 160001 AND 960000