Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. SELECT a.insert_timestamp, a.audyt_table_field_old_value, a.audyt_table_field_new_value, ((audyt_table_field_old_value-audyt_table_field_new_value) / audyt_table_field_old_value) as ratio, p.products_model FROM `audyt` a INNER JOIN products p ON (p.products_id = a.audyt_table_primary_id) WHERE audyt_table_field = "products_price" AND audyt_table_field_old_value > 0 ORDER BY ABS(audyt_table_field_old_value-audyt_table_field_new_value) / audyt_table_field_old_value DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement