Multiple IN statements for WHERE. Would this return good data?
- by TheDudeAbides
SELECT ['VISA CK - 021810$'].[ACCT NBR #1], ['VISA CK - 021810$'].[ALT CUST NM #1], ['VISA CK - 021810$'].[LAST USED]
FROM ['VISA CK - 021810$']
WHERE ['VISA CK - 021810$'].[ALT CUST NM #1]
IN (
SELECT ['VISA CK - 021810$'].[ALT CUST NM #1]
FROM ['VISA CK - 021810$']
GROUP BY ['VISA CK - 021810$'].[ALT CUST NM #1]
HAVING COUNT(['VISA CK - 021810$'].[ALT CUST NM #1]) > 1
)
AND ['VISA CK - 021810$'].[ACCT NBR #1]
IN (
SELECT ['VISA CK - 021810$'].[ACCT NBR #1]
FROM ['VISA CK - 021810$']
GROUP BY ['VISA CK - 021810$'].[ACCT NBR #1]
HAVING COUNT(['VISA CK - 021810$'].[ACCT NBR #1]) > 1
)