Loading
  1. SELECT        CONCAT(time_recorder_users.user_first_name, ' ', time_recorder_users.user_last_name) AS first_last, time_recorder_operations.operation_name,
  2.                          time_recorder_tasks.task_name, time_recorder_tasks.is_zero_minutes_task, time_recorder_customers.customer_name, time_recorder_farms.farm_name,
  3.                          time_recorder_jobs.start_time, time_recorder_jobs.end_time, TIMESTAMPDIFF(MINUTE, time_recorder_jobs.start_time, time_recorder_jobs.end_time)
  4.                          AS MinutesTaken
  5. FROM            time_recorder_jobs INNER JOIN
  6.                          time_recorder_users ON time_recorder_jobs.user_id = time_recorder_users.user_id INNER JOIN
  7.                          time_recorder_companies ON time_recorder_users.company_id = time_recorder_companies.company_id INNER JOIN
  8.                          time_recorder_operations ON time_recorder_jobs.operation_id = time_recorder_operations.operation_id INNER JOIN
  9.                          time_recorder_tasks ON time_recorder_jobs.task_id = time_recorder_tasks.task_id INNER JOIN
  10.                          time_recorder_customers ON time_recorder_jobs.customer_id = time_recorder_customers.customer_id INNER JOIN
  11.                          time_recorder_farms ON time_recorder_jobs.farm_id = time_recorder_farms.farm_id
  12. WHERE        (time_recorder_jobs.user_id = 6) AND (time_recorder_jobs.deleted = 0) AND (time_recorder_jobs.start_time >= '1/1/2014') AND
  13.                          (time_recorder_jobs.end_time <= '8/19/2014 11:59:59 PM') AND (time_recorder_jobs.user_id = 6) AND (time_recorder_users.company_id = 2) AND
  14.                          (time_recorder_tasks.is_zero_minutes_task = 0)
  15. ORDER BY time_recorder_jobs.end_time DESC

Comments