I have an object News in Weaviate with a year, a month, a day and some other data columns. I want to count the rows per year and month. In SQL this would look like this:
SELECT year, month, count(*) FROM news group by year, month;
In Weaviate GraphQL I only managed to group by one column.
{
Aggregate {
News (groupBy:["month"]) {
groupedBy {
path
value
}
meta {
count
}
}
}
}
Unfortunately the Weaviate documentation misses out this issue.
What is the correct way to group by multiple fields in Weaviate GraphQL? (PS: in fact I need to implement this in Python using the weaviate-client-api)