Skip to content

Instantly share code, notes, and snippets.

@amitjambusaria
Last active May 3, 2018 16:12
Show Gist options
  • Save amitjambusaria/6c525c95d5a1dcb9ee7374bd63a0bdee to your computer and use it in GitHub Desktop.
Save amitjambusaria/6c525c95d5a1dcb9ee7374bd63a0bdee to your computer and use it in GitHub Desktop.
Carry Estimates/Time logged
select
t.PrtID as TicketID,
t.PrtMinutesEstimated as TicketEstimateInMin,
a.PrtPtscID as ScrumID,
s.PtspID as SprintID,
s.PrtMinutesEstimated as SprintEstimateInMin,
tt.PttMinutes as TimeLoggedInMin,
tt.PttEmID as TimeLoggedEmployee,
tt.PttDate as TimeLoggedDate
from csn_internaltools.dbo.tblPTTask t
inner join csn_internaltools.dbo.tblPTTaskExtAgile a
on t.PrtID = a.PrtID
inner join csn_internaltools.dbo.tbljoinPTTaskPTSprints s
on t.PrtID = s.PrtID
inner join csn_internaltools.dbo.tblPTTaskTime tt
on t.PrtID = tt.PttPrtID
and t.PrtID in
(
-- Tickets that have been in multiple sprints (carry over tickets)
select PrtID from csn_internaltools.dbo.tbljoinPTTaskPTSprints
group by PrtID
having count(PrtID) > 1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment