Friday, October 14, 2016

Personal: 抽取重覆的資料記錄

供個人網頁使用,不作參考解釋。
SELECT rc.id FROM recruitInformation AS r
INNER JOIN (
 SELECT id, DATE, content, COUNT( * ) AS dupCount
 FROM recruitInformation
 GROUP BY DATE, content HAVING COUNT( * ) >1
) AS rc ON r.content = rc.content
AND r.date = rc.date
AND r.id = rc.id

No comments: