
使用分析功能:
SELECt *FROM( SELECt VendorName, IncidentID, IncidentStatus, IncidentDate, MAX(IncidentDate) OVER (PARTITION BY VendorName) maxDate FROM yourTable) tORDER BY t.maxDate DESC, t.VendorName ASC, t.IncidentDate DESC
请参阅: http:
//docs.oracle.com/javadb/10.8.2.2/ref/rrefsqlj13658.html
http://docs.oracle.com/cd/E11882_01/server.112/e10592/functions003.htmhttp://
/docs.oracle.com/cd/E11882_01/server.112/e26088/functions004.htm
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)