Built-in Window Functions and Filter

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Built-in Window Functions and Filter

Douglas Hall
From https://www.sqlite.org/windowfunctions.html:
"It is a syntax error to specify a FILTER clause as part of a built-in window function invocation."

I'm curious, why is this the case? Why is a FILTER clause only allowed when used with aggregate functions?

Thanks,
Douglas Hall
CONFIDENTIALITY NOTICE: This e-mail contains PRIVILEGED AND CONFIDENTIAL information intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, you are notified that any disclosure, copying, distribution, electronic storage or use of this communication is prohibited. If you received this communication in error, please notify me immediately by e-mail, attaching the original message, and delete the original message from your computer and any network to which your computer is connected.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Built-in Window Functions and Filter

Dan Kennedy-4
On 11/15/2018 02:56 AM, Douglas Hall wrote:
> From https://www.sqlite.org/windowfunctions.html:
> "It is a syntax error to specify a FILTER clause as part of a built-in window function invocation."
>
> I'm curious, why is this the case? Why is a FILTER clause only allowed when used with aggregate functions?

One real reason is because postgres (and I think everybody else at the
moment) disallows them.

Another is that it's not always clear what FILTER expressions should do
for built-in window functions. How does it affect row_number(), for example?

Dan.



>
> Thanks,
> Douglas Hall
> CONFIDENTIALITY NOTICE: This e-mail contains PRIVILEGED AND CONFIDENTIAL information intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, you are notified that any disclosure, copying, distribution, electronic storage or use of this communication is prohibited. If you received this communication in error, please notify me immediately by e-mail, attaching the original message, and delete the original message from your computer and any network to which your computer is connected.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users