看板 Statistics 關於我們 聯絡資訊
我的資料是 ID Start_Date End_Date A 1985/3/1 1993/1/1 A 1993/1/1 2001/3/1 A 2001/3/1 2001/12/31 A 2007/11/11 2008/1/1 A 2008/1/1 2009/2/16 想把它整理成 ID Start_Date End_Date A 1985/3/1 2001/12/31 A 2007/11/11 2009/2/16 可以怎麼處理?麻煩高手指點。@@ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.25.24.19 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1678615834.A.EE0.html
tom8chu: 用日期先切資料(2002),後續排序id date分別用first.Id 03/12 18:49
tom8chu: 去找start ,last 找end 再合併資料? 03/12 18:49
linec153: 可以利用retain 加上一些條件判斷做輸出即可做到 03/12 19:48
freedomyang: 篇幅較長,我多列出幾個不同id,code參考截圖 03/18 00:43
freedomyang: https://i.imgur.com/ZHxeZ01.jpg 03/18 00:44
freedomyang: https://i.imgur.com/Dal77HK.jpg 03/18 00:46
freedomyang: https://i.imgur.com/Vbs2OFh.jpg 03/18 00:46