这是indexloc提供的服务,不要输入任何密码
Skip to content

group by #8127

@joshua-gould

Description

@joshua-gould

Is your proposal related to a problem?

The ability execute group by queries via graphql. For example, I might want to get the average and min rating per month. Currently I need to create a view for every way I want to aggregate.

Describe the solution you'd like

query {
	articles_aggregated(groupBy: ["author", "year(publish_date)"]) {
		group
		sum {
			revenue
		}
	}
}

Describe alternatives you've considered

https://docs.directus.io/reference/query/#aggregation-grouping

If the feature is approved, would you be willing to submit a PR?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    k/enhancementNew feature or improve an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions