LEFT JOIN QUERY RESULT GROUP BY OR DISTINCT
Can someone help me ? I'm trying to make a LEFT JOIN QUERY, but the query return duplicate result. Its possible make a DISTINCT or GROUPBY ? Why the query return the JOIN values to ? The result dont need to show me only F.cmis:objectId as ID, F.cmis:name as name this columns ?
SELECT F.cmis:objectId as ID, F.cmis:name as name FROM arizona:file:business F LEFT JOIN arizona:relationship:copyrights RFC ON RFC.cmis:sourceId = F.cmis:objectId LEFT JOIN arizona:copyrights C ON C.cmis:objectId = RFC.cmis:targetId LEFT JOIN arizona:copyrights:permission P ON P.arizonaCopyrightsPermission:copyrightsId = C.cmis:objectId
The CMIS Query Language does not support DISTINCT or GROUP BY. See the spec § 188.8.131.52.1 BNF Grammar.
Nuxeo returns the object id and type for each joined document because this has proven to be very useful, and is used internally. Why is it a problem? The tool that is going to consume that data will only keep what it needs anyway.