Advertisement
Guest User

Untitled

a guest
Apr 7th, 2021
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. SELECT
  2. <list of fields>,
  3. GROUPING_ID((case
  4. when ?='true'
  5. then t1.[xyz]
  6. else null
  7. end)) AS [_groupId]
  8. <snip>
  9. GROUP BY(CASE
  10. when ?='true'
  11. then t1.[xyz]
  12. else null
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement