I have an Oracle table which has a name,value,time columns.Basically the table is for logging purposes to store what are the changes made to a particular name,what was the previous value and what time the change was made.
I need to formulate a query to fetch the top n changes for a particular name,and the output should have all the names in the table.
Any help/suggesstions?
Edit:
Name Value Time Harish Pass 1-Nov-2011 Ravi Fail 2-Nov-2011 Harish Absent 31-Oct-2011 Harish Attended 31-Aug-2011 Harish Present 31-Jul-2011
I need to select details of Harish on 1st Nov,Oct 31st,31st Aug and Ravi.
Is this what you are after?
My test set-up:
Here is the query: