Merging where clauses