Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- count(case when coalesce(x.col1,1) = coalesce(y.col1,1) then null else 1 end) as cnt_col1,
- count(case when coalesce(x.col2,"1") = coalesce(y.col2,"1") then null else 1 end) as cnt_col2
- from
- `DatasetA.Table` x
- OUTER JOIN
- `DatasetB.Table` y
- on x.col1 = y.col1
- col1, col2
- null, null
- null, null
- 1, null
- null, 1
- COLUMN, COUNT_OF_ERRORS
- cnt_col1, 0
- cnt_col2, 0
- ...
- cnt_col15, 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement