I have a query where not all conditions are necessary. Here\'s an example of what it looks like when all conditions are used:
select num from (select distinct q.
where ( columnA = passedValue or passedValue = -1 )
when passed value into sql is -1, columnA can be anything..