SELECT DISTINCT ON (commclass_id, comminterpretation.commname) /* there are 330 more comminterpretations than commclasses. some of these multiple determinations have the same commname. */ * FROM commclass LEFT JOIN comminterpretation USING (commclass_id) ORDER BY commclass_id, comminterpretation.commname, comminterpretation_id