#28333: Filter and subquery for window expressions
-------------------------------------+-------------------------------------
Reporter: Mads Jensen | Owner: (none)
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: window orm filter | Triage Stage: Accepted
subquery GSoC |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by rossm6):
I have this problem as well.
According to this article https://learnsql.com/blog/window-functions-not-
allowed-in-where/ the solution is either to use a common table expression
or a subquery which is the FROM clause in the sql query. Neither
unfortunately is supported by django it seems. Although I did find this
package for the first option -
https://docs.djangoproject.com/en/3.2/ref/models/querysets/#extra.
Both of these should be options in the Django ORM right? Each would be a
big win for the power of the ORM.
--
Ticket URL: <https://code.djangoproject.com/ticket/28333#comment:17>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.a16ddbc85647b508bd06a2eedffe1a79%40djangoproject.com.