Skip to content

Instantly share code, notes, and snippets.

@Jacknq
Last active January 6, 2021 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jacknq/f7c2a2e6031a928a520ce07a0999abad to your computer and use it in GitHub Desktop.
Save Jacknq/f7c2a2e6031a928a520ce07a0999abad to your computer and use it in GitHub Desktop.
SELECT $ FROM post
INCLUDE categories,tags
where $.Categories[*].$id any in [ 7 , 10]
SELECT *.Categories[*], sum(*.Categories[*].id) as c
FROM post
--include $.Categories
where $.Categories!=null and Count($.Categories[*])>0 and $.$missing any !=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment