I was wanting to know how I get the last two ids from the table based on certain conditions
for example, if today is 1st July, I want to get the id of record for today and then the id of the record before this.
Please note that the id for the previous record might be different, as this is sorted by date, so previous_id = current_id - 1 would not work.
Thanks for your time
Sunil