I have a table tbl_usi in mysql with records as below:
present_date usi_value deal_count ---------------------------------------------------------- 2015-10-13 b1 c1 2015-10-12 b2 c2 2015-10-11 b3 c3
I want to write a query that will do this using present_date field to select the present date and the date before it and display them together:
present_date usi_value deal_count previous_date previous_usi_value previous_deal_count ---------------------------------------------------------- 2015-10-13 b1 c1 2015-10-12 b2 c2 2015-10-12 b2 c2 2015-10-11 b3 c3 2015-10-11 b3 c3 2015-10-10 b4 c4
How do I achieve this. Thanks