Skip to content

Instantly share code, notes, and snippets.

@jodyphelan
Last active June 1, 2026 04:52
Show Gist options
  • Select an option

  • Save jodyphelan/c3a15936cb8bfb86a9a01835710fe64c to your computer and use it in GitHub Desktop.

Select an option

Save jodyphelan/c3a15936cb8bfb86a9a01835710fe64c to your computer and use it in GitHub Desktop.
SELECT *,
row_number() OVER(PARTITION BY QcVariantConsensusID ORDER BY CASE WHEN NCount IS NULL THEN 1 ELSE 0 END, NCount ASC, DateSequencing ASC) AS [rn]
FROM [Casper].[CTE_exercise]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment