SQL select if a certian number of WHERE clauses satisfied

Viewed 111

So I have a SQL statement of the following form with multiple WHERE clauses:

SELECT cols FROM table
WHERE
CONDITION1 OR
CONDITION2 OR 
...
CONDITIONN

I know that if I run this, then I will get all rows that satisfy at least one of the above n conditions.

But now, I want to return the rows such that at least k of the WHERE conditions are satisfied. Is there a way to do this in SQL without writing out all n Choose k subsets of the set of WHERE clauses?

2 Answers
Related