Re: [sqlite] sqlite3_analyzer for Debian

2017-12-07 Thread nitpilot
Am Thu, 7 Dec 2017 19:29:46 + schrieb Simon Slavin : > It’s not part of the standard Debian installation, but you can > download it as part of the precompiled binaries for your platform: > > > > Note that sqlite3_analyzer is a compiled Tcl program. It

[sqlite] finding the number of records until a value is different

2017-12-07 Thread nitpilot
Hi all, I have a DB i.e. like this: table values bc temp 35 123 35 124 35 123 20 123 12 123 12 123 16 123 35 123 35 123 35 123 35 123 35 123 The value in temp (or all the other columns) is not of interest. Now I a looking for the

Re: [sqlite] calculation with the result of two select results

2017-10-30 Thread nitpilot
Hi Richard, I'm not sure, what You mean. My intention was to drop the seconds while finding the correct rows. The data for the records is collected by a perl script and this stores the records sometimes at hh:mm:09 sometimes at hh:mm:10. The timestamp is assigned automaticly while creating usin

Re: [sqlite] calculation with the result of two select results

2017-10-30 Thread nitpilot
On Monday, 30 October 2017 07:27:38 CET Richard Hipp wrote: > On 10/30/17, nitpi...@arcor.de wrote: > > I was trying with parenthesizing but without luck. > > (SELECT ... ) - (SELECT ... -1 day ...); > > You want: > > SELECT (SELECT ...)-(SELECT ... -1 day ...); OMG, so easy! Thank You very mu

[sqlite] calculation with the result of two select results

2017-10-30 Thread nitpilot
Hi gurus, I have a database from which I get two (integer) values, one from today and the second from same time yesterday: SELECT kwh_th FROM werte WHERE STRFTIME('%Y-%m-%d %H:%M', timestamp) = STRFTIME('%Y-%m-%d %H:%M', 'now', 'localtime', '-1 minute'); SELECT kwh_th FROM werte WHERE STRFTIME('