I am trying to select the max value from one column, while grouping by another non-unique id column which has multiple duplicate values. The original database looks somethin
Try using a virtual table as follows:
SELECT vt.*,c.name FROM( SELECT c.mukey, Max(c.comppct_r) AS ComponentPercent FROM c GROUP BY c.muke; ) as VT, c WHERE VT.mukey = c.mukey