Skip to content

Instantly share code, notes, and snippets.

@psapir
Last active August 12, 2016 17:32
Show Gist options
  • Save psapir/895d0b95b8c60073806c4a2d0174feff to your computer and use it in GitHub Desktop.
Save psapir/895d0b95b8c60073806c4a2d0174feff to your computer and use it in GitHub Desktop.
Distributing Rows Equally with Query Activities
SELECT FirstName, EmailAddress, NTILE(3) OVER(ORDER BY NewID() DESC) AS groupID
FROM Subscribers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment