File: //proc/self/root/tmp/handel_mc_err.txt
--------------
SELECT CONCAT('mentions=',(SELECT COUNT(*) FROM notifications WHERE mentioned_agent='handel' AND COALESCE(delivered,0)=0),' assigned_open=',(SELECT COUNT(*) FROM task_assignments ta JOIN tasks t ON t.id=ta.task_id WHERE ta.agent_name='handel' AND t.status NOT IN ('done','cancelled')),' open_total=',(SELECT COUNT(*) FROM tasks WHERE status NOT IN ('done','cancelled')),' status_counts=',(SELECT GROUP_CONCAT(CONCAT(status,':',cnt) ORDER BY status SEPARATOR ',') FROM (SELECT status, COUNT(*) cnt FROM tasks GROUP BY status) s))
--------------
ERROR 1054 (42S22) at line 1: Unknown column 'ta.agent_name' in 'WHERE'