N1QL subquery in select

That is not enough the relation needs to be through document key. The primary key relation ship is through document key.

Example : “doc1”, “docxyz” are document keys. These two can be joined because “doc1” contains the document key as join key.

“doc1” { “name”: “abc”, “joinKey”: “docxyz”}
“docxyz” {“f1”:123}