Skip to content

Instantly share code, notes, and snippets.

@armchairdeity
Created July 31, 2018 23:19
Show Gist options
  • Save armchairdeity/8d5a01f564b37d13d99032c1a14af32f to your computer and use it in GitHub Desktop.
Save armchairdeity/8d5a01f564b37d13d99032c1a14af32f to your computer and use it in GitHub Desktop.
Selecting work items that have been in more than one sprint
SELECT TOP 100
WorkItem,
IterationPath,
COUNT(WorkItem) AS WorkItemCount
FROM
WorkItemHistoryView
WHERE
IterationPath NOT LIKE '%deleted node%'
AND IterationPath IS NOT NULL
GROUP BY WorkItem, IterationPath HAVING COUNT(IterationPath) > 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment