MAX() OVER() 函数

SELECT T1.FRAMENO,
                       T1.UNDERTAKER10,T1.STATUSCODEDATE10,
                       MAX(T1.STATUSCODEDATE10) OVER(PARTITION BY T1.FRAMENO)
                FROM   RT_REPAIR T1                       
                WHERE  T1.STATUSCODEDATE10 IS NOT NULL ORDER BY T1.FRAMENO,T1.STATUSCODEDATE10 

 

posted @ 2015-01-21 12:15  沙耶  阅读(2591)  评论(0编辑  收藏  举报