Fix SQL error for missing AND operator

AND operator was missing from WHERE clause