Advertisement
Fhernd

R0305.sql

Dec 1st, 2015
16,857
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.28 KB | None | 0 0
  1. SELECT R.ProductID,
  2.         Varianza = AVG(DATEDIFF(day, ScheduledStartDate, ActualStartDate)),
  3.         Varianza_Ajustada = AVG(NULLIF(DATEDIFF(day, ScheduledStartDate, ActualStartDate), 0))
  4.     FROM Production.WorkOrderRouting R
  5.     GROUP BY R.ProductID
  6.     ORDER BY R.ProductID;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement