On Thu, 11 Apr 2013 17:14:43 +0200
Clemens Ladisch wrote:
> >> It should come (or be derived) from the current row in the outer
> >> query.
> >
> > Sorry, but inner queries are performed first.
>
> Sorry, but *correlated* inner queries are performed once for each
> record in the outer query.
*L
Simon Slavin wrote:
> On 11 Apr 2013, at 2:38pm, Clemens Ladisch wrote:
>>> sqlite> create table t(x);
>>> sqlite> select (select 42 limit 1 offset (select t.x)) from t;
>>> Error: no such column: t.x
>
>> It should come (or be derived) from the current row in the outer query.
>
> Sorry, but in
On 11 Apr 2013, at 2:38pm, Clemens Ladisch wrote:
>> sqlite> create table t(x);
>> sqlite> select (select 42 limit 1 offset (select t.x)) from t;
>> Error: no such column: t.x
> It should come (or be derived) from the current row in the outer query.
Sorry, but inner queries are performed fi
rsday, April 11, 2013 8:39 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] correlated subquery in LIMIT/OFFSET?
Michael Black wrote:
> > However, it appears that SQLite does not allow correlated subqueries
> > in the LIMIT/OFFSET clauses of a scalar subquery:
> >
> &g
Michael Black wrote:
> > However, it appears that SQLite does not allow correlated subqueries
> > in the LIMIT/OFFSET clauses of a scalar subquery:
> >
> > sqlite> create table t(x);
> > sqlite> select (select 42 limit 1 offset (select t.x)) from t;
> > Error: no such column: t.x
>
> Instead
rs-boun...@sqlite.org] On Behalf Of Clemens Ladisch
Sent: Thursday, April 11, 2013 8:15 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] correlated subquery in LIMIT/OFFSET?
Hi,
for computing the median of a group, it would be useful to be able to
use a correlated subquery as the expression in a OF
Hi,
for computing the median of a group, it would be useful to be able to
use a correlated subquery as the expression in a OFFSET clause.
However, it appears that SQLite does not allow correlated subqueries
in the LIMIT/OFFSET clauses of a scalar subquery:
sqlite> create table t(x);
sqlite>
7 matches
Mail list logo