I have 2 tables i.e:
products - Stores product info.
prices - Stores prices of products. This will have multiple entries for each product, can say that I am storing price variations of the product. So everytime its changed a new record is added instead of updating the old one.
I have to fetch products which have been re-priced, meaning get the products with latest price and their second last variation also.
So I have to display like:
Prod Name, Latest Price, Old Price
How to achieve this ?