Advertisement
campocreek

Untitled

Dec 22nd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. SELECT
  2. pa.id
  3. ,pad.id
  4. ,pa.avalaible_gen
  5. ,pad.avalaible_gen
  6. ,pa.price_torg
  7. ,pad.price_torg
  8. ,(pa.price_torg - pad.price_torg) AS 'price_diff'
  9. FROM `prices_all` pa
  10. LEFT JOIN `prices_all_duplicate_21_12_18_2` pad ON pa.id = pad.id
  11.  
  12. WHERE 1=1
  13. -- AND pa.avalaible_gen != pad.avalaible_gen
  14. AND pa.price_torg != pad.price_torg
  15. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement