I have a SQL statement that would work but is it possible to eliminate the subquery?
Here is the SQL statement:
col_1 = 'x'
col_2 = 'a'
and col_3 = 'b'
and col_4 in (SELECT col_4 FROM table_2 WHERE table_2.col_5 = 'c')
In other words, I want to make sure that table_1.col_4 is a value that is determined from table_2. Is this the best way to write this query or is there a way to join table_2 to eliminate the sub-query?