Isla, you are correct. When I added the Destinct, it pushed and error that the attachment field is not compatible. Is there a way to create a button to a popup form for attachments for each unique record so that way I could remove the direct attachement field from the query? Thank you.Another reason not to use multivalue fields of which attachment fields are a subtype
Your attachment field is made up of 3 parts: FileData, FileName, FileType. Together these manage the MVF component of the field
You can use DISTINCT with FileName and/or FileType but not with FileData or the attachment field itself.
However, now I've seen the full SQL including the use of MVFs/attachments, I would be very surprised if using DISTINCT on these will solve your problem.