請各位大神幫幫忙,我希望data 和place 兩欄一樣的合併成各一列然後Time這欄取最大值
原始Data 如下
date Time place
2020/7/1 10:20:10 a
2020/7/1 11:20:10 a
2020/7/1 13:20:10 a
2020/7/1 10:20:10 b
2020/7/1 10:33:10 b
希望效果如下
date Time place
2020/7/1 13:20:10 a
2020/7/1 10:33:10 b
可以使用 group by date,place + max
Time 解決問題
select [date], max([Time]) Time, [place]
from T
group by [date], [place]