SQL query to find the user that resolved/completed the work item
I'm trying to write an SQL query to get the user that resolved/completed a work item. (IR and SR)
I've looked around and saw some tips that ServiceManager.dbo.MT_System$WorkItem$Incident_Log contains the records of when the status changed from $notResolved/$notCompleted to $resolved/$completed and then somehow link that EntityChangeLogId to the user who made the change.
But it's that last part that I am struggling with. Does anyone have an SQL example of this? Or perhaps someone could point me in the right direction.
To summarize: I want to have a column that gives me the name of the agent that solved that particular WorkItem, be it SR or IR. So we have to look for when the WorkItem changed to Completed or Resolved and who made that change.
My knowledge of SQL is basic at best so I would really appreciate some help :)!