1
select `labtech`.`h_commands`.`Status` AS `Status`,`labtech`.`h_commands`.`User` AS `User`,`labtech`.`h_commands`.`CmdID` AS `CmdID`,`labtech`.`h_commands`.`ComputerID` AS `ComputerID`,`labtech`.`h_commands`.`Command` AS `Command`,`labtech`.`h_commands`.`OutPut` AS `OutPut`,`labtech`.`h_users`.`Message` AS `Message`,cast(`labtech`.`h_commands`.`DateExecuted` as date) AS `DateStarted`,cast(`labtech`.`h_commands`.`DateExecuted` as time) AS `TimeStarted`,cast(`labtech`.`h_commands`.`DateFinished` as time) AS `TimeFinished`,`labtech`.`h_users`.`UserID` AS `UserID`,timestampdiff(MINUTE,`labtech`.`h_commands`.`DateExecuted`,`labtech`.`h_commands`.`DateFinished`) AS `TimeSpent` from (`labtech`.`h_commands` left join `labtech`.`h_users` on(((`labtech`.`h_commands`.`CmdID` = `labtech`.`h_users`.`ID`) and (`labtech`.`h_users`.`AuditAction` = 11)))) where (`labtech`.`h_commands`.`Command` in (11,209)) order by `labtech`.`h_commands`.`DateExecuted`