This is a valid statement:
SELECT foo FROM table1 WHERE
column1 IN (SELECT bar FROM table2) AND
column2 IN (SELECT bar FROM table2)
But is there any way we can avoid repeating the SELECT bar FROM table2
statement to make it simpler and more economical?
I mean something like this:
SELECT foo FROM table1 WHERE
«column1 and also column2» IN (SELECT bar FROM table2)