數據重複 的一種寫法

LEFT JOIN (SELECT * FROM (SELECT B.BILL_CODE, B.ACK_CODE, ROW_NUMBER() OVER(PARTITION BY B.ACK_CODE ORDER BY B.BILL_CODE) R FROM TAB_BILL_JHD_ACKREL B) WHERE R = 1) S ON S.ACK_CODE = T.BILL_CODE

相關文章
相關標籤/搜索