2つ以上のカウント値を合計したい[ピボット]クエリは次のとおりです。
SELECT
client_name.client_name ,
escort ,
count(case mission_status_reason when '4' then mission_status_reason end) as awaiting_upload_at_origin,
count(case mission_status_reason when '6' then mission_status_reason end) as awaiting_military_escort,
count(case mission_status_reason when '3' then mission_status_reason end) as enrouted_to_destination,
count(case mission_status_reason when '9' then mission_status_reason end) as awaiting_download,
( awaiting_military_escort +enrouted_to_destination+ awaiting_download ) as TOTAL
FROM usc_tmr
LEFT JOIN client_name on client_name.id = usc_tmr.client_name
WHERE escort='usg'
and mission_status_ops IN ('1','4','5','6')
GROUP BY client_name
私の問題はTOTALを計算することです。助けてくれませんか。