On 2011-06-27 17:34 Simon Davies wrote:
> select julianday( ( select max( day_date ) from days ) );
Of course I tried this, but with a single bracket I got a syntax error.
With double bracket it works.
Thanks!
Adam
___
On 27 June 2011 16:16, hilaner wrote:
> I have hundred thousands of records in this table:
>
> CREATE TABLE days (
> day_id INTEGER NOT NULL PRIMARY KEY,
> day_date DATE
> );
>
> CREATE INDEX day_i ON days (day_date ASC);
>
> And then if I run such query:
>
>
I have hundred thousands of records in this table:
CREATE TABLE days (
day_id INTEGER NOT NULL PRIMARY KEY,
day_date DATE
);
CREATE INDEX day_i ON days (day_date ASC);
And then if I run such query:
EXPLAIN QUERY PLAN
SELECT JULIANDAY(MAX(day_date)) FROM days;
0|0|0|SCAN TABLE
3 matches
Mail list logo