Can you use ORDER BY clause in aggregate functions?

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

Can you use ORDER BY clause in aggregate functions?

sqlite-10
Can you use ORDER BY clause in aggregate functions? It seems that you cannot; it is only available for window functions.
However, sometimes is useful using ORDER BY with aggregate functions that aren't window functions, such as GROUP_CONCAT function.
Therefore is the suggestion to add it if it doesn't already.
_______________________________________________
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: [EXTERNAL] Can you use ORDER BY clause in aggregate functions?

Hick Gunter
I am not sure what you are trying to achieve. Can you give an example?

-----Urspr√ľngliche Nachricht-----
Von: sqlite-users [mailto:[hidden email]] Im Auftrag von [hidden email]
Gesendet: Freitag, 07. September 2018 21:30
An: [hidden email]
Betreff: [EXTERNAL] [sqlite] Can you use ORDER BY clause in aggregate functions?

Can you use ORDER BY clause in aggregate functions? It seems that you cannot; it is only available for window functions.
However, sometimes is useful using ORDER BY with aggregate functions that aren't window functions, such as GROUP_CONCAT function.
Therefore is the suggestion to add it if it doesn't already.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
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: Can you use ORDER BY clause in aggregate functions?

Keith Medcalf
In reply to this post by sqlite-10
>Can you use ORDER BY clause in aggregate functions? It seems that you
>cannot; it is only available for window functions.
>However, sometimes is useful using ORDER BY with aggregate functions
>that aren't window functions, such as GROUP_CONCAT function.
>Therefore is the suggestion to add it if it doesn't already.

group_concat is already a window function ...




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