Is it possible to create an aggregate over multiple tables? Specifically, I have tables videos and categories. Each video document has a categoryId. I would like to aggregate over categories to e.g. count the number of videos in each category. I also have a third table, watchSessions which basically just store a videoId and the duration of the watch event. I would also like to relate these through videos to categories to maintain statistics about which categories are particularly popular, and the evolution of this over time etc...
I have a hard time setting this up elegantly with an aggregate - can it be done? And does it sound like a good use case for aggregates? Thanks ๐