答案 0 :(得分:0)
您的问题可以通过几种不同的方式解释。
此查询将为您提供_CX_CD_REQ_LC_001
和_CX_CD_REQ_LC_002
等于"拒绝"的行数。
SELECT COUNT(*) AS 'Count'
FROM [YourTable]
WHERE _CX_CD_REQ_LC_001 = 'Denied'
AND _CX_CD_REQ_LC_002 = 'Denied'
这个将为您提供"拒绝"的值的出现次数。无论它在哪个领域。
SELECT x.Count1 + y.Count2
FROM
(
SELECT COUNT(*) AS 'Count1'
FROM [YourTable]
WHERE _CX_CD_REQ_LC_001 = 'Denied'
) x
CROSS JOIN
(
SELECT COUNT(*) AS 'Count2'
FROM [YourTable]
WHERE _CX_CD_REQ_LC_002 = 'Denied'
) y
你想要的是哪一个?
诺尔