Query to fetch users who have completed a task at any given instance

Hi Everyone, I Have created a bpmn workflow using camunda and deployed on a server, the workflow currently follows a sequential process.(eg It moves from a to b then from b to c and so on and so forth)

With the help of the camunda database, i am having problem formulating a sql query to fetch the users who have approved(completed) a particular task at any given instance of time.

Hi @Abhishek,

You can do a join query from both tables (ACT_HI_OP_LOG and ACT_HI_TASKINST)

SELECT t.*, op.USER_ID_ FROM ACT_HI_TASKINST t INNER JOIN ACT_HI_OP_LOG  op
ON t.ID_ = op.TASK_ID_
WHERE OPERATION_TYPE_ = 'Complete'