Displaying 1 result from an estimated 1 matches for "total_client_hours".
2006 Jul 16
4
Calculations across multiple tables
...sk_id, project_id, clients.client_name,
tasks.description,
time_records.start_at,
(SUM(TIME_TO_SEC(time_records.end_at) -
time_to_sec(time_records.start_at)) / 60) AS total_client_minutes,
(SUM(TIME_TO_SEC(time_records.end_at) -
time_to_sec(time_records.start_at)) / 3600) AS total_client_hours
FROM clients, tasks, time_records
WHERE tasks.client_id = clients.id AND time_records.task_id = tasks.id
GROUP BY client_id, project_id, task_id WITH ROLLUP;
--
View this message in context: http://www.nabble.com/Calculations-across-multiple-tables-tf1951400.html#a5351226
Sent from t...