-2

Below is my sample:

SELECT f.id as family, c.FirstName AS child, p.GivenName AS pet FROM Families f JOIN c IN f.Children JOIN p IN c.Pets WHERE p.GivenName = 'Fluffy' ORDER BY c.FirstName

pefs
  • 59
  • 1
  • 4
  • can you post your JSON – Sajeetharan Oct 14 '19 at 16:56
  • 1
    Hi @Sajeetharan, here is: [{ "id": "AndersenFamily", "lastName": "Andersen", "parents": [{ "firstName": "Thomas" }, { "firstName": "Mary Kay" } ], "children": [{ "firstName": "Henriette Thaulow", "gender": "female", "grade": 5, "pets": [{ "givenName": "Fluffy" }] }], "address": { "state": "WA", "county": "King", "city": "Seattle" }, "creationDate": 1431620472, "isRegistered": true }] – pefs Oct 14 '19 at 17:40

1 Answers1

1

"Order-by over correlated collections is not supported" which means that JOIN and Order by clause are not supported together.

You need to consider changing the data model suits your need.

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396