Re: [sqlite] last_value() without nulls?

2019-12-29 Thread jasql
> On 29. Dec 2019, at 19:27, Keith Medcalf wrote: > > > See last sentence of paragraph 3 of > https://www.sqlite.org/windowfunctions.html#built_in_window_functions I knew I'd seen that sentence somewhere :-) > Perhaps the following? > [...] It works! OK, ever since we gained CTE's I've

Re: [sqlite] last_value() without nulls?

2019-12-29 Thread Keith Medcalf
See last sentence of paragraph 3 of https://www.sqlite.org/windowfunctions.html#built_in_window_functions Perhaps the following? with s1(t, v) as (values (1, 's1-a'), (3, 's1-c')), -- series 1 s2(t, v) as (values (1, 's2-a'), (4, 's2-d')),

[sqlite] Assertion Bug in Sqlite

2019-12-29 Thread Yongheng Chen
Hi, We found an assertion bug in Sqlite. Here’s the PoC: — CREATE TABLE v0 ( v1 ) ; CREATE TABLE v2 ( v3 INTEGER UNIQUE ON CONFLICT ABORT ) ; CREATE TRIGGER x AFTER INSERT ON v2 WHEN ( ( SELECT v1 AS PROMO_REVENUE FROM v2 JOIN v0 USING ( VALUE ) ) AND 0 ) BEGIN DELETE FROM v2 ; END ; CREATE

[sqlite] last_value() without nulls?

2019-12-29 Thread jasql
Hi everyone, I am trying to correlate several sparse time series with disjunct time-points in such a way that null values (via left join) are replaced by the most recent value in each time series respectively. Each series only records changes in values, which are then assumed to remain

Re: [sqlite] SQL help

2019-12-29 Thread x
Thanks Barry. I think that’s saying something like what I was saying but I put it better than them. I’m buoyed by the fact it’s not just Scottish education that could be done gooder  From: Barry Smith Sent: 28 December 2019 22:49 To: SQLite mailing