$sql = "SELECT DISTINCT Chicken_ID,Organ_ID,Color_ID, MAX(C_Percentage) as MAX_CPercentage FROM dominant_feature GROUP BY Chicken_ID, Organ_ID ORDER BY Chicken_ID,Organ_ID"; // คำสั่ง sql อ่านข้อมูลจากตาราง dominant_feature
เท่านี้ก็พอแล้ว Code (PHP)
$sql = "SELECT * FROM dominant_feature WHERE Chicken_ID = '2' ORDER BY Organ_ID ASC";