Last active
December 31, 2018 16:01
-
-
Save wvpv/731ad7a0049fa0224ffce9fb248d3e1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
x.bounceCategory | |
, x.sendid | |
from ( | |
select | |
b.bounceCategory | |
, b.sendid | |
, row_number() over (partition by b.bounceCategory order by newid()) ranking | |
from _bounce b | |
) x | |
where x.ranking = 1 | |
/* list all of the bounce categories and return */ | |
/* a random sendid/jobid associated with each one */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment