i am trying to get the number of documents in my collection (country id id partition key)
when i execute the plain query with out partition key as follows it is getting error
SELECT COUNT(c.memberId) FROM c
Error :- Cross partition query only supports 'VALUE ' for aggregates.
late i added partition key in where condition
SELECT COUNT(c.memberId) FROM c where c.countryId=209
when i execute the query every time i am getting different results like
[ { "$1": 39161 } ]
[ { "$1": 400454 } ]
[ { "$1": 300454 } ]
[ { "$1": 200454 } ]
why it is not working properly ? is there any mistake in my query?