Re: [SQL ]MAX()其他相依的欄位資料
※ 引述《folus (folus)》之銘言:
: 請教各位高手:
: 我目前遇到一個問題,直接看 SQL 吧
: select id,max(value) from table group by id
: table 欄位共有 id,value,date,note
: 我要如何查詢相依於結果 id,max(value)的其他欄位呢?
: 感謝高手協助
oracle 的語法可以參考,
不知道是不是你要的結果!
select id, value, date, note
from table
where id || value in (
select id || max(value)
from table
group by id
)
--
Sent from my Android
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.25.203.155
討論串 (同標題文章)