SQL Calculating Turn-Around-Time with Overlapping Concideration -
i have table (parts) store when item requested , when issued. this, can compute each items turn-around-time ("tat"). i'd have column ("computed") overlapping request-to-issue dates computed.
recid requested issued tat computed md0001 11/28/2012 12/04/2012 6.00 0.00 md0002 11/28/2012 11/28/2012 0.00 0.00 md0003 11/28/2012 12/04/2012 6.00 0.00 md0004 11/28/2012 11/28/2012 0.00 0.00 md0005 11/28/2012 12/10/2012 12.00 0.00 md0006 11/28/2012 01/21/2013 54.00 54.00 md0007 11/28/2012 11/28/2012 0.00 0.00 md0008 11/28/2012 12/04/2012 6.00 0.00 md0009 01/29/2013 01/30/2013 1.00 1.00 md0010 01/29/2013 01/30/2013 1.00 0.00 md0011 02/05/2013 02/06/2013 1.00 1.00 md0012 02/07/2013 03/04/2013 25.00 25.00 md0013 03/07/2013 03/14/2013 7.00 7.00 md0014 03/07/2013 03/08/2013 1.00 0.00 md0015 03/13/2013 03/25/2013 12.00 11.00 md0016 03/20/2013 03/21/2013 1.00 0.00 totals 133.00 99.00 <- waiting parts tat summary in above, manually filled in ("computed") column there example of i'm trying accomplish.
note: notice how md0013 affects computed time md0015 md0013 "computed" first. have been md0015 computed first, md0013 affected accordingly - net result there -1 day.
Comments
Post a Comment