Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DB1.20180320.email
- FROM DB1.20180320
- left join DB2.20180319 on DB1.20180320.email = DB2.20180319.email
- AND DB2.20180319.Status = 'active'
- WHERE DB2.20180319.email IS null;
- (SELECT DB2.20180319.email
- FROM DB2.20180319
- WHERE Status = 'active'
- AND DB2.20180319.email IS NOT NULL)
Add Comment
Please, Sign In to add comment