how do I execute GROUP BY queries
gregorvilkner opened this issue · 1 comments
gregorvilkner commented
Alex, I know this has been a most wanted for a long time and has finally been released. Works great in the portal. But when I try queries that use aggregation and grouping, i get the error below. How should I go about this?
Cheers, happy holidays, and kind regards, Gregor
"Continuation token is not supported for queries with GROUP BY. Do not use FeedResponse.ResponseContinuation or remove the GROUP BY from the query."
gregorvilkner commented
i got this to work using the cosmos container.
paste and duct tape from: https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos.Samples/Usage/Queries/Program.cs
FeedIterator<JObject> aFeedIterator = cosmosClientGraph.Container.GetItemQueryIterator<JObject>(query);
while (aFeedIterator.HasMoreResults)
{
foreach (JObject x in await aFeedIterator.ReadNextAsync())
{