Re: [sqlite] BUG: Aggregate functions in subqueries

2014-09-14 Thread Richard Hipp
On Sun, Sep 14, 2014 at 11:47 AM, Keith Medcalf wrote: > > Yes, the max(y) operation is flattened out of the query probably because > it is not referenced anywhere and the optimizer does not see that it is > performing any useful function. There is still only one row

Re: [sqlite] presentation about ordering and atomicity of filesystems

2014-09-14 Thread James K. Lowden
On Sat, 13 Sep 2014 15:43:00 -0400 Richard Hipp wrote: > There were often restrictions on the permitted values for block > sizes. And you couldn't ask the operating system to tell you whether > a file was text or binary or sequential or random-access or what its > block-size

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread jose isaias cabrera
"Richard Hipp" wrote... On Sun, Sep 14, 2014 at 4:31 PM, Simon Slavin wrote: On 14 Sep 2014, at 8:58pm, jose isaias cabrera wrote: > Yeah, that is what I am using now. I was trying to get the speed that supposedly is in the IN clause. :-)

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread Richard Hipp
On Sun, Sep 14, 2014 at 4:31 PM, Simon Slavin wrote: > > On 14 Sep 2014, at 8:58pm, jose isaias cabrera > wrote: > > > Yeah, that is what I am using now. I was trying to get the speed that > supposedly is in the IN clause. :-) Thanks. > > BETWEEN

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread Simon Slavin
On 14 Sep 2014, at 8:58pm, jose isaias cabrera wrote: > "Darren Duncan" wrote... >> >> >> BETWEEN '2014-01-01' AND '2014-01-05' > > Yeah, that is what I am using now. I was trying to get the speed that > supposedly is in the IN clause. :-) Thanks. BETWEEN is

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread jose isaias cabrera
"Martin Engelschalk" wrote... Hi Jose, you are probably looking for the between-Operator: Open http://www.sqlite.org/lang_expr.html and search for "The BETWEEN operator" inn you case, date BETWEEN '2014-01-01' AND '2014-01-05' Martin Thanks, Martin. Yes, that is what I am using now...

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread jose isaias cabrera
"Simon Slavin" wrote... On 14 Sep 2014, at 11:59am, Martin Engelschalk wrote: you are probably looking for the between-Operator: Open http://www.sqlite.org/lang_expr.html and search for "The BETWEEN operator" inn you case, date BETWEEN '2014-01-01' AND

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread jose isaias cabrera
"Darren Duncan" wrote... On 2014-09-13, 10:07 PM, jose isaias cabrera wrote: I know that the IN clause contains a list of something. I.e. IN ('2014-01-01', '2014-01-02', '2014-01-03', '2014-01-04', '2014-01-05') So the question is, is there a shorter way for one to say something like, IN

Re: [sqlite] BUG: Aggregate functions in subqueries

2014-09-14 Thread Keith Medcalf
Yes, the max(y) operation is flattened out of the query probably because it is not referenced anywhere and the optimizer does not see that it is performing any useful function. There is still only one row returned, however, because the same accumulator is used to collect the result, it just

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread Clemens Ladisch
jose isaias cabrera wrote: > I know that the IN clause contains a list of something. I.e. > > IN ('2014-01-01', '2014-01-02', '2014-01-03', '2014-01-04', '2014-01-05') > > So the question is, is there a shorter way for one to say something like, > > IN ('2014-01-01', ..., '2014-01-05') > > where

Re: [sqlite] BUG: Aggregate functions in subqueries

2014-09-14 Thread Zsbán Ambrus
On 9/14/14, Lea Verou wrote: > Per the 3.7.11 changelog [1], queries of the form SELECT max(x), y FROM > table return the value of y from the same row that contains the maximum x > value. However, this: Hello! I don't think this is a bug. The documentation for the SELECT

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread Simon Slavin
On 14 Sep 2014, at 11:59am, Martin Engelschalk wrote: > you are probably looking for the between-Operator: Open > http://www.sqlite.org/lang_expr.html and search for "The BETWEEN operator" > > inn you case, date BETWEEN '2014-01-01' AND '2014-01-05' By the way,

Re: [sqlite] BUG: Aggregate functions in subqueries

2014-09-14 Thread Kees Nuyt
On Sun, 14 Sep 2014 00:18:34 -0400, Lea Verou wrote: > Per the 3.7.11 changelog [1], queries of the form > SELECT max(x), y FROM table return the value of y > from the same row that contains the maximum x value. > However, this: > select y from (SELECT max(x), y FROM table); >

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread Martin Engelschalk
Hi Jose, you are probably looking for the between-Operator: Open http://www.sqlite.org/lang_expr.html and search for "The BETWEEN operator" inn you case, date BETWEEN '2014-01-01' AND '2014-01-05' Martin Am 14.09.2014 07:07, schrieb jose isaias cabrera: Greetings! I know that the IN

[sqlite] BUG: Aggregate functions in subqueries

2014-09-14 Thread Lea Verou
Per the 3.7.11 changelog [1], queries of the form SELECT max(x), y FROM table return the value of y from the same row that contains the maximum x value. However, this: select y from (SELECT max(x), y FROM table); would not return the same y rows. This would work as expected: select m, y from

Re: [sqlite] The IN (... ) clause

2014-09-14 Thread Darren Duncan
On 2014-09-13, 10:07 PM, jose isaias cabrera wrote: I know that the IN clause contains a list of something. I.e. IN ('2014-01-01', '2014-01-02', '2014-01-03', '2014-01-04', '2014-01-05') So the question is, is there a shorter way for one to say something like, IN ('2014-01-01', ...,