My table structure is (id,cluster,qid,priority). I’m trying to figure out how I can display the maximum value of priority for each cluster. Say cluster 1 has priorities 100, 102, 105. I want to display the record containing 105. Please help.
My table structure is (id,cluster,qid,priority). I’m trying to figure out how I can display
Share
Here is an article that explains how to select the row with the max value for each group.
http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/