SELECT
CASE WHEN "dbo"."ClaimDataFormat"."RELATION" = 'DAUGHTER'
OR "dbo"."ClaimDataFormat"."RELATION" = 'SON'
OR "dbo"."ClaimDataFormat"."RELATION" = 'SISTER'
OR "dbo"."ClaimDataFormat"."RELATION" = 'FATHER'
OR "dbo"."ClaimDataFormat"."RELATION" = 'MOTHER'
OR "dbo"."ClaimDataFormat"."RELATION" = 'WIFE'
OR "dbo"."ClaimDataFormat"."RELATION" = 'HUSBAND'
THEN 'SPOUSE'
ELSE 'SELF'
END AS RELATION,
sum("dbo"."ClaimDataFormat"."CLAIM_AMT") AS TOTAL_CLAIM_AMOUNT
FROM
"dbo"."ClaimDataFormat"
GROUP BY
"dbo"."ClaimDataFormat"."RELATION"
上述查询的结果集如下所示,但我只想要两行,第一行添加“SPOUSE”的所有值,第二行仅添加值为 1,689,292.0 的“SELF”
RELATION TOTAL_CLAIM_AMOUNT
-------------------
SPOUSE 121724.0
SPOUSE 2440297.0
SPOUSE 145586.0
SPOUSE 853361.0
SELF 1689292.0
SPOUSE 1.0
SPOUSE 373190.0
SPOUSE 1984198.0
我需要帮助才能做到这一点。请建议我该怎么做