कुछ इस तरह का प्रयास करें:
SELECT a.status AS ct_reconcile_status,
(IFNULL(b.sch_change_status_num,0) + a.num) AS sch_change_status_num
FROM
(SELECT 'SUCCESS' AS status, 0 AS num
UNION
SELECT 'FAILED', 0) a
LEFT JOIN
(SELECT status.ct_reconcile_status,
COUNT(status.ct_reconcile_status) AS sch_change_status_num
FROM db_crewops_cm_action status
WHERE status.ct_reconcile_status IN ( 'SUCCESS', 'FAILED' )
AND status.updated_ts > UTC_TIMESTAMP() - INTERVAL 60 minute
GROUP BY status.ct_reconcile_status) b
ON a.status = b.ct_reconcile_status
आप status.ct_reconcile_status IN ( 'SUCCESS', 'FAILED' ) AND
को हटा सकते हैं , लेकिन यह धीमा हो सकता है।