Alert me | Edit | Delete | Change type Question You cannot vote on your own post 0 Hi!
Lets assume I have docuents in following manner:
{
id: 123,
tags: [ { name: "something" } ]
}
and I want to query all documents that contain a tag with name="searched" OR have the id=9000. I tested on playground ( https://www.documentdb.com/sql/demo )something like:
SELECT food.id, food.description, food.tags
FROM food
JOIN tag IN food.tags
WHERE food.id = "09052" or tag.name="blueberries"
but then I get a bunch of duplicate records, each document from food is times the amount of tags in that document.
How can I get distinct results when filtering on nested collection and root properties?