If a WHERE
clause contains a condition which is redundant in the context of the the rest of the clause, then it can be removed. If it
is redundant because it does not match the programmer’s intent, then it’s a bug and the sub-condition should be fixed.
Noncompliant code example
SELECT name, price
FROM product
WHERE price > 15 -- Noncompliant
AND price < 100 -- Noncompliant
AND price = 50
Compliant solution
SELECT name, price
FROM product
WHERE price = 50