Guest User

Untitled

a guest
Feb 19th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.28 KB | None | 0 0
  1. WITH join1 AS (
  2. SELECT * FROM table1
  3. INNER JOIN table2
  4. ON table1.userID=table2.userID
  5. ),
  6. join2 AS (
  7. SELECT * FROM table1
  8. INNER JOIN table3
  9. ON table1.userID=table3.userID
  10. )
  11.  
  12. SELECT * FROM join1
  13. WHERE join1.userID=join2.userID AND join1.Entitlement <> join2.entitlement
Add Comment
Please, Sign In to add comment