I have this below..It is supposed to bring back a total of 3 for the count zip field. If you just use the getdate and statement, you get a total of 2 due to one of the fields being blank. If you use both the "and" and "or" you get 4???
SELECT a.ClientName AS Client, b.Zip AS ZipCode, COUNT(b.Zip) AS Zip
FROM dbo.Acc AS a INNER JOIN
dbo.vwa0 AS b WITH (nolock) ON a.ClientID = b.clientID
WHERE (b.StatusReason IN ('pending', 'reopen', 'reschedule', 'spanish pending'))
AND b.fudt <= getdate()
OR b.fudt = ('')
GROUP BY a.ClientName, b.Zip
SELECT a.ClientName AS Client, b.Zip AS ZipCode, COUNT(b.Zip) AS Zip
FROM dbo.Acc AS a INNER JOIN
dbo.vwa0 AS b WITH (nolock) ON a.ClientID = b.clientID
WHERE (b.StatusReason IN ('pending', 'reopen', 'reschedule', 'spanish pending'))
AND b.fudt <= getdate()
OR b.fudt = ('')
GROUP BY a.ClientName, b.Zip