Subject: And now that I've hit post...
Author:
Posted on: 2015-10-29 03:18:00 UTC
Those queries will both give you one row per hazardous chemical in an assessment - if you're dealing with, say, the unholy child of chlorine trifluoride and nitrogen tetroxide (why would you do that?), you'd get back the id twice, once for the join with FC3 and once for the join with NO4. However, if you replace the first line with:
select (distinct a.id) from assessments a
that will only give you one copy of each assessment ID. Distinct is a useful keyword.