Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Nested aggregation queries #67

Open
plcplc opened this issue Nov 17, 2023 · 1 comment
Open

Enhancement: Nested aggregation queries #67

plcplc opened this issue Nov 17, 2023 · 1 comment

Comments

@plcplc
Copy link
Contributor

plcplc commented Nov 17, 2023

We can both sort and filter based on nested aggregations (i.e., through a path of relationships), but curiously, aggregate fields is only concerned with top-level aggregates.

This would seem like a nice thing to be able to do.

For instance, in the Chinook data model, it would allow selecting the total number of tracks that an artist have across all their albums (or, considering Paths have predicates, total number of tracks from albums published within the last 3 years).

@paf31
Copy link
Collaborator

paf31 commented Nov 20, 2023

For your example, you can compute the aggregate using a where clause and exists, right?

If we want to do the same for every track in a row set of tracks, then I think that potentially overlaps with group by functionality, and we could consider it in that context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants