結果 : select column based on max value of another column sql