Re: [sqlite] [OT] Re: i Know i should use 'AS', but ....

2018-12-24 Thread Shawn Wagner
Using '.mode column" in conjunction with ".headers on" you're already using makes it a lot more obvious. On Mon, Dec 24, 2018, 12:20 PM Luuk On 24-12-2018 19:21, Peter Johnson wrote: > > The headers are present in all three queries you pasted. > > > > The first result shows two rows, the top row

[sqlite] [OT] Re: i Know i should use 'AS', but ....

2018-12-24 Thread Luuk
On 24-12-2018 19:21, Peter Johnson wrote: The headers are present in all three queries you pasted. The first result shows two rows, the top row is the header. The other two results show 4 rows each, the top row of each is the header row. -P On Tue, 25 Dec 2018, 3:42 AM Luuk sqlite> .version

[sqlite] Seasonal syntax

2018-12-24 Thread Simon Slavin
Some SQL terminology: Selection Clause: WHERE Sort Clause: ORDER BY Sublist Clause: LIMIT OFFSET Subsort Clause: GROUP BY HAVING Santa Clause: SELECT name,hobbies,address FROM people WHERE behaviour='nice’ Season’s greetings and best wishes to all

Re: [sqlite] i Know i should use 'AS', but ....

2018-12-24 Thread Peter Johnson
The headers are present in all three queries you pasted. The first result shows two rows, the top row is the header. The other two results show 4 rows each, the top row of each is the header row. -P On Tue, 25 Dec 2018, 3:42 AM Luuk sqlite> .version > SQLite 3.26.0 > > sqlite> .headers on > >

Re: [sqlite] Sample Employee database ported to SQLite from MySQL

2018-12-24 Thread Jungle Boogie
On Sun 23 Dec 2018 7:15 PM, Larry Brasfield wrote: > Jungle Boogie wrote: > ➢ Anyone else have issues decompressing the file? $ bzip2 -d employees.db.bz2 > bzip2: employees.db.bz2 is not a bzip2 file. bunzip2 employees.db.bz2 > bunzip2: employees.db.bz2 is not a bzip2 file. $ file

Re: [sqlite] SQLite 3.26.0 recursive CTE performance regression

2018-12-24 Thread Sebastian Bank
Am 24.12.2018 um 13:12 schrieb Richard Hipp: There are now enhancements on a branch (https://www.sqlite.org/src/timeline?r=reuse-subqueries) that should fix your performance problem. Since you seem to be someone who writes intense SQL, it would be really cool if you could try out that branch

[sqlite] i Know i should use 'AS', but ....

2018-12-24 Thread Luuk
sqlite> .version SQLite 3.26.0 sqlite> .headers on sqlite> select 1 as X,date(); X|date() 1|2018-12-24 sqlite> select x,row_number() over (order by 1 desc) from (select 1 as x union all select 2 union all select 3); x|row_number() over (order by 1 desc) 3|1 2|2 1|3 Why are the headers

Re: [sqlite] SQLite 3.26.0 recursive CTE performance regression

2018-12-24 Thread Richard Hipp
On 12/22/18, Sebastian Bank wrote: > > given a table that represents an adjacency tree, I use a recursive CTE > together with group_concat() to generate the path for each tree item. > > With SQLite up to version 3.25.3 the query below (with the 500 example > items inserted below) takes about 0.2