IFNULL(SUM(CASE WHEN eis.issue_state= '4' THEN 1 ELSE 0 END), 0) AS shiftProjectTotal, 0 AS votingIncr, 0 AS votingTotal, 0 AS votingPercent, IFNULL(SUM(CASE WHEN DATE_FORMAT(eis.UPDATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
IFNULL(SUM(CASE WHEN eis.issue_state= '4' THEN 1 ELSE 0 END), 0) AS shiftProjectTotal, IFNULL(SUM(CASE WHEN DATE_FORMAT(eit.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
AND eis.issue_state= '0' THEN 1 ELSE 0 END), 0) AS votingIncr,
IFNULL(SUM(CASE WHEN eis.issue_state= '0' THEN 1 ELSE 0 END), 0) AS votingTotal,
IFNULL(ROUND(SUM(CASE WHEN DATE_FORMAT(eit.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
AND eis.issue_state= '0' THEN 1 ELSE 0 END) / SUM(CASE WHEN eis.issue_state= '0' THEN 1 ELSE 0 END), 6), 0) AS votingPercent