(
SELECT DISTINCT C.PRESCRIBER_NM, C.CITY_TX, C.STATE,
Sum(B.RX_COUNT_QY) as Claims
FROM CLAIMSA.TCLIENT1 A
CLAIMSA.TRXCLM_BASE B
CLAIMSA.TPRSCBR_PRESCRIBE1 C
WHERE A.CLIENT_ID = B.CLIENT_ID AND
A.CLIENT_ID in (12115, 12494) AND
B.FILL_DT Between '01-01-2005' AND '12-31-2005' AND
B.NTW_PRESCRIBER_ID = C.PRESCRIBER_ID
Group by C.PRESCRIBER_NM, C.CITY_TX, C.STATE
);
Want this output: "Sum(B.RX_COUNT_QY) as Claims" to show only if the value is >500. How do I do that?
SELECT DISTINCT C.PRESCRIBER_NM, C.CITY_TX, C.STATE,
Sum(B.RX_COUNT_QY) as Claims
FROM CLAIMSA.TCLIENT1 A
CLAIMSA.TRXCLM_BASE B
CLAIMSA.TPRSCBR_PRESCRIBE1 C
WHERE A.CLIENT_ID = B.CLIENT_ID AND
A.CLIENT_ID in (12115, 12494) AND
B.FILL_DT Between '01-01-2005' AND '12-31-2005' AND
B.NTW_PRESCRIBER_ID = C.PRESCRIBER_ID
Group by C.PRESCRIBER_NM, C.CITY_TX, C.STATE
);
Want this output: "Sum(B.RX_COUNT_QY) as Claims" to show only if the value is >500. How do I do that?