Skip to main content
2 of 4
added 23 characters in body
Martin Smith
  • 86.5k
  • 15
  • 252
  • 342

You could also use

SELECT GroupID,
       SomeValue
FROM   tablename
ORDER  BY MAX(CRYPT_GEN_RANDOM(4)) OVER (PARTITION BY GroupID),
          GroupID, --Just in case 2 groups get the same random number
          SomeValue; 

Online demo

Martin Smith
  • 86.5k
  • 15
  • 252
  • 342