I am trying to see how often a customer has requested Re-Activation of their Internet account.
So my data set is below.
I am trying to Count from the first time a Re-Activation request was created until the First time it was COMPLETED, once it has been completed finish the count of days it took for the request to complete and count the number of NON COMPLETIONS and PARTIALLY statuses which occurred between that time.
I have the below code, which mostly works correctly with some other scenarios I tested.
However, for the example below I am trying to count the number for N-CO (non completions) until completion but it return 5 instead of 3.
And i am trying to create another column to count the PARTIALLY which is 2.
Any once have some input as to why?
What do I need to change?
CREATETABLE#temp(Identifiervarchar(20)NOTNULL,CreatedDate...