Based on the following table
ID Date State
-----------------------------
1 06/10/2010 Complete
1 06/04/2010 Pending
2 06/06/2010 Active
2 06/05/2010 Pending
I want the following ouptut
ID Date State
---------------------------
1 06/04/2010 Complete
2 06/05/2010 Active
So date is the earliest one and State is the latest one. I am failing to apply self join on the table to get the output.
Thanks