Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. select
  2. count(case when coalesce(x.col1,1) = coalesce(y.col1,1) then null else 1 end) as cnt_col1,
  3. count(case when coalesce(x.col2,"1") = coalesce(y.col2,"1") then null else 1 end) as cnt_col2
  4. from
  5. `DatasetA.Table` x
  6. OUTER JOIN
  7. `DatasetB.Table` y
  8. on x.col1 = y.col1
  9.  
  10. col1, col2
  11. null, null
  12. null, null
  13. 1, null
  14. null, 1
  15.  
  16. COLUMN, COUNT_OF_ERRORS
  17. cnt_col1, 0
  18. cnt_col2, 0
  19. ...
  20. cnt_col15, 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement