-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Allow function results in group by #608
Comments
I am not exactly sure what this gives me. I already created a custom function for
|
Could you show your code with models here? I can try it. |
My custom extract work well with
Usage example:
|
I could also add code for
|
OK, this should be a new feature |
Allow function results in group by. (#608)
Allow grouping by function result. This is especially useful with datetime fields. A simple example from postgresql :
SELECT EXTRACT(YEAR from date_column) FROM sales group by EXTRACT(YEAR from date_column)
You can see how this is useful when creating for example yearly, monthly or daily sales results. Without this functionality you need to denormalize your table so year , month and day stays in separate columns.
The text was updated successfully, but these errors were encountered: