我有一个类似于下面显示的示例的表。
AccountNo DateOfOrder OrderID
-----------------------------------------
123 March 1 2010 1
222 March 3 2010 2
123 April 1 2010 3
345 March 15 2010 77
123 june 1 2010 55
123 march 5 2010 33
345 march 1 2010 99
222 june 1 2010 7
222 june 2 2010 22
我需要一个输出三列的查询:
AccountNo
, MostRecentDateOfOrder
,SecondMostRecentDateOfOrder