Guest User

Untitled

a guest
Feb 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. select
  2. id,
  3. a.price as price_1701,
  4. b.price as price_1702,
  5. c.price as price_1703
  6. from
  7. t_1701 as a
  8. full join t_1702 as b using (id)
  9. full join t_1703 as c using (id)
  10. order by
  11. id ;
  12.  
  13. select
  14. id,
  15. a.price as price_1701,
  16. b.price as price_1702,
  17. c.price as price_1703
  18. from
  19. ( select id from t_1701
  20. union
  21. select id from t_1702
  22. union
  23. select id from t_1703
  24. ) as t
  25. left join t_1701 as a using (id)
  26. left join t_1702 as b using (id)
  27. left join t_1703 as c using (id)
  28. order by
  29. id ;
Add Comment
Please, Sign In to add comment