标签:
1 SELECT * 2 FROM SSE2_FLOW_EXPENSE T1 3 JOIN (SELECT SFEL.*, 4 ROW_NUMBER() OVER(PARATITION BY SFEL.FE_EXPENSENO ORDER BY SFEL.LOG_HAPPENDATE DESC) RN 5 FROM SSE2_FLOW_EXPENSE_LOG SFEL) T2 6 ON T1.FE_EXPENSENO = T2.FE_EXPENSENO 7 AND T2.RN = 1
标签:
原文地址:http://www.cnblogs.com/cxxjohnson/p/5494899.html