3 ms·
I think I recall when this feature was discussed and implemented. If it's what I'm thinking of, this concern was carefully considered: If a subquery in the
by cldellow 5y ago
I think I recall when this feature was discussed and implemented.
If it's what I'm thinking of, this concern was carefully considered:
If a subquery in the FROM clause has an ORDER BY, that ORDER BY is omitted if all of the following conditions are also true:
1. There is no LIMIT clause in the subquery
2. The subquery was not one of the virtual subqueries added internally by SQLite for window-function processing
3. The subquery is not part of the FROM clause in an UPDATE-FROM statement
4. The outer query does not use any aggregate functions other than the built-in count(), min(), and/or max() functions.
5. Either the outer query has its own ORDER BY clause or else the subquery is one term of a join.
from https://sqlite.org/forum/forumpost/878ca7a9be0862af?t=h https://sqlite.org/forum/forumpost/878ca7a9be0862af?t=h
- cryptonector 5y agoThanks! That works for me!