Re: [sqlite] Can SQLite do this in a single query?

2019-10-22 Thread Petr Jakeš
> Yes, I forgot the column mode_id in the Employee's table. > > Thanks, I'll read up on the features SQLite's SELECT has to offer. At > worst, > I'll just run a simpler query multiple times. > Will the results of simple query multiple times help you somehow? Think about how to join two or more

Re: [sqlite] Can SQLite do this in a single query?

2019-10-21 Thread Petr Jakeš
> Shouldn't there be field MODE_ID in the Employee table? > It looks like a high school homework to me :D ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [EXTERNAL] Re: select for power-meter accumulated total readings

2019-10-21 Thread Petr Jakeš
> > For a (meaningful, as opposed to "all interpolated values") granularity of > 1 hour, information theory states that you need a sample every 30 minutes > or less. > > The desire to charge consumers more for "peak power" (just like utilities > have to pay more for "peak power" and less for "base

Re: [sqlite] select for power-meter accumulated total readings

2019-10-20 Thread Petr Jakeš
On Sun, Oct 20, 2019 at 8:23 PM Petr Jakeš wrote: > > > On Sun, Oct 20, 2019 at 4:36 PM Keith Medcalf wrote: > >> >> On Sunday, 20 October, 2019 06:58, Petr Jakeš >> wrote: >> >> >On Sun, Oct 20, 2019 at 2:53 AM Keith Medcalf >> wrote: >&

Re: [sqlite] select for power-meter accumulated total readings

2019-10-20 Thread Petr Jakeš
On Sun, Oct 20, 2019 at 4:36 PM Keith Medcalf wrote: > > On Sunday, 20 October, 2019 06:58, Petr Jakeš > wrote: > > >On Sun, Oct 20, 2019 at 2:53 AM Keith Medcalf > wrote: > > >> On Saturday, 19 October, 2019 18:26, Petr Jakeš < > petr.jakes@gmail.com

Re: [sqlite] select for power-meter accumulated total readings

2019-10-20 Thread Petr Jakeš
On Sun, Oct 20, 2019 at 2:53 AM Keith Medcalf wrote: > On Saturday, 19 October, 2019 18:26, Petr Jakeš > wrote: > > >After long time I have set up development environment properly and I am > >able to start to study your queries. > > >I am lost. I don't eit

Re: [sqlite] select for power-meter accumulated total readings

2019-10-19 Thread Petr Jakeš
September, 2019 12:26, Petr Jakeš > wrote: > > >Yes, you are right. The error is connected with the version of > >SQLite. Now I am trying to build DB Browser using SQLite version 3.29.0. > >Than I have to study your code. Your knowledge and SQL Windows > >function

Re: [sqlite] select for power-meter accumulated total readings

2019-09-02 Thread Petr Jakeš
at 8:19 PM Keith Medcalf wrote: > > On Monday, 2 September, 2019 10:34, Petr Jakeš > wrote: > > >Wow, this is HUUUDGE !!! > >Thanks! > >What editor are you using, btw? > > Typically this is on Windows 10 (for Workstations) and the editor I use is > TSE (

Re: [sqlite] select for power-meter accumulated total readings

2019-09-02 Thread Petr Jakeš
Wow, this is HUUUDGE !!! Thanks! What editor are you using, btw? I am on Linux Mint and trying your queries with "SQLite Studio" and "DB Browser for SQLite" is throwing syntax error (I think because of the rows "lead(timestamp) over (order by timestamp) as next_timestamp," From the sqlite3

Re: [sqlite] select for power-meter accumulated total readings

2019-09-01 Thread Petr Jakeš
in to the database. On Thu, Aug 8, 2019 at 9:36 AM Petr Jakeš wrote: > I am storing electricity consumption data to the sqlite. > > The simple table to store kWh consumption looks like following example > (accumulated total readings in each row - exactly as you see on your > electricity

Re: [sqlite] [EXTERNAL] select for power-meter accumulated total readings

2019-08-08 Thread Petr Jakeš
Yes, I have edited data to have a power consumption in indicated date. You are very precise (observant), BTW :D On Thu, Aug 8, 2019 at 12:10 PM Jean-Christophe Deschamps wrote: > > Oops, didn't notice the date of said row was out of sequence wrt rowids. > >

Re: [sqlite] [EXTERNAL] select for power-meter accumulated total readings

2019-08-08 Thread Petr Jakeš
An ID is just an ID. Unique mark in the row. No other meaning. So sanitizing not necessary, AFIK. On Thu, Aug 8, 2019 at 11:59 AM Jean-Christophe Deschamps wrote: > Beware that row id 6655 isn't correct (total_kwh is suddenly decreasing). > This inconsistancy maybe related to row 6654 missing:

Re: [sqlite] [EXTERNAL] select for power-meter accumulated total readings

2019-08-08 Thread Petr Jakeš
enough mesurements, you could do a fourier > analysis to quantify daily/weekly/yearly variations and a "base load" > > -Ursprüngliche Nachricht- > Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > Im Auftrag von Petr Jakeš > Gesendet: Donner

[sqlite] select for power-meter accumulated total readings

2019-08-08 Thread Petr Jakeš
I am storing electricity consumption data to the sqlite. The simple table to store kWh consumption looks like following example (accumulated total readings in each row - exactly as you see on your electricity meter): |ID|timestamp|kWh ||1 | 2019-07-31 14:24:25 | 270.8||2 |