SELECT areasymbol AS Area_symbol, musym AS Map_unit_symbol, m.mukey AS MUKEY, c.cokey AS COKEY, compname AS Component_name,
comppct_r AS Component_percent, pmgroupname AS Parent_material, pmorder AS Parent_material_order, pmmodifier AS Texture_modifer,
pmgenmod AS General_modifier, pmkind AS Kind, pmorigin AS Origin
FROM legend AS l
INNER JOIN mapunit AS m ON l.lkey=m.lkey AND l.areasymbol LIKE
'NV767'
INNER JOIN component AS c ON m.mukey=c.mukey AND compkind = 'series'
LEFT OUTER JOIN copmgrp AS cpg ON c.cokey = cpg.cokey AND cpg.rvindicator='yes'
LEFT OUTER JOIN copm AS cpm ON cpg.copmgrpkey=cpm.copmgrpkey
ORDER BY areasymbol, musym, comppct_r DESC, pmorder ASC