On Tue, Feb 25, 2020 at 1:03 PM John McKown
<john.archie.mck...@gmail.com> wrote:
> > I am storing time series data arriving from a sensor into (time,value)
> > records, like so:
> > 10:32  12
> > 10:35  15
> > 10:37  15
> > 10:39  13
> > 10:43  13
> > 10:46  18
> >
> > and I want to avoid storing repetitive data, so that the database should
> > contain
> > 10:32  12
> > 10:35  15
> > 10:39  13
> > 10:46  18
> > where only the earliest time with the unchanging value is stored.
...
> Why not:
>
> CREATE TABLE ME (ATIME TIME, VALUE INTEGER PRIMARY KEY);
>
> You can't INSERT duplicate numbers into the "VALUE" column, it will fail.

This won't work here because the same value COULD reappear later:
12 15 15 13 13 18 15
needs to be registered as 12 15 13 18 15
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to