DateTime Functions are needed

Thanks for the details and the link. You can certainly do your aggregations in Dgraph. In a previous life, I have worked on a reporting tool using natural language. You can see a sample at Querying Airline data - YouTube , it’s using NLP and Dgraph and it’s covering all king of aggregations. I’ll find sometime to share how it’s done in a blog.
The key point for dates is to build a date tree (day → month → quarter → year and if you need day → day of week, day->day of month → month etc …). and to compute the aggregation using Dgraph vars and summary functions (count, sum, min, , max and variable propagation). Using a tree, you cannot use directly the DQL groupby as it is grouping by a predicate of a node. The approach is very generic and you can group by any hierarchy ( sub-category → category, city->county->state etc …)…