There are several day_timestamp for each index_id.
Anyone can help me to write a sql to generate the most recent
day_timestamp of index_ids which has not accessed into the system in
90 days from today's date.
So, I need to get the most recent date and time for each index_id in
90 days from today's date.
Sample data:
Index_id day_timestamp
2 2001-04-11 21-29-31
2 2002-05-21 21-29-31
2 2003-06-11 21-29-31
2 2004-11-21 21-29-31
2 2004-09-21 21-29-31
5 2000-04-21 21-29-31
5 2003-05-21 21-29-31
5 2003-06-21 21-29-31
5 2004-09-11 21-29-31
8 2000-08-11 21-29-31
8 2004-04-01 21-29-31
8 2004-09-21 21-29-31
8 2004-09-23 21-29-31
10 2001-04-11 21-29-31
10 2002-04-21 21-29-31
10 2003-08-11 21-29-31
10 2004-10-21 21-29-31
10 2004-09-21 21-29-31
The output will be as below:
2 2004-11-21 21-29-31
5 2004-09-11 21-29-31
8 2004-09-23 21-29-31
10 2004-10-21 21-29-31