Jon Barker
Jon Barker

Reputation: 54

Bigquery need to check for the existence of a set of values in one column in one set of tables and not in the other set of tables

Three table has a column with, for example, names. Need to know which names do not exist in the other three tables. Need to do this as efficiently as possible.

Upvotes: 1

Views: 590

Answers (1)

Mosha Pasumansky
Mosha Pasumansky

Reputation: 14004

select name from table1, table2, table3
where name not in (select name from other1, other2, other3)

Upvotes: 1

Related Questions