Query Definitions - Removing duplicate rows / returning a single relationship row

Hello all. I am adding more information to the 'BOM Structure' tgv query and could use some help in removing duplicate rows. Although I know various ways of handling this in SQL, I have not been able to arrive at a solution using where or join conditions in this Query Definition.

In this case, I want to display a link to the items CAD drawing viewable. The below query outputs the correct results (using a foreign CAD classification property) however there are occasions where the Part CAD relationship may have been been accidentally created twice. Ideally, I would only return the first row.

Here is a screenshot of the query definition:

Here is what the output looks like:

Any help is appreciated. Thank you