0
votes

Workflow status logs table: enter image description here

The first table is what I have, the second table is the result.

How to make it? help please.

RequestStatusLogs table: 
Id
UserFK
PreviousStatusFK
CurrentStatusFK
TimeStamp
IP
RequestFK
Comment
AudienceType
1
It is very hard to predict the logic required just from table output. Please add some detail about your requirement. Some required fields are understandable and some of them are not. - Venkatesh
i have this table of Id UserFK PreviousStatusFK CurrentStatusFK TimeStamp IP RequestFK Comment AudienceType - Jaber Adnan
Still needs a logic like how draft value is "19" in result table? Is the table shared has all values or only snap of the table is posted? Similar way other fields too. - Venkatesh
Jaber, I suggest you write your case in sqlfiddle.com first, so we do our simulation to solve and apply the query for the result for you there easier. - Atheer Mostafa

1 Answers

0
votes

I am posting the code as per my interpretation from the just table output. This is not complete answer.

Select Count(RequestReview),Count(CompleteReq),Count(CompleteReq1) FROM InputTable Group By RequestFK