Is this query valid? Or do I need to break it down more?
SELECT SUM(colA) as 'colA',
SUM(colB) as 'colB'
WHERE colA,colB REGEXP 'Fail'
OR colA, colB='Pass'
ORDER BY colA, colB;
=/equality testing, there's the
WHERE x=1 or x=2 or x=3 .... WHERE x='pass' or y='pass' or ....
can be a simple
WHERE x IN (1,2,3,....) WHERE 'pass' IN (x,y,....)
You MAY be able to do something similar with regex matches, e.g.
WHERE 'Fail' REGEXP CONCAT(colA, colB, etc...)
but that depends on exactly what your regex pattern is. For anything else, there's no shortcuts. You have to write it all out.