On 10 Feb 2020, at 1:25am, no...@null.net wrote: > Here is one way that appears to generate the correct result.
Another way: create two VIEWs, one for systolic, one for diasystolic. Index both VIEWs on (id, date), then JOIN ON id AND date. If you want to, you could use this to make a third VIEW which would have the systolic and diasystolic figures on the same row. If you are going to do more than just this on that data convert the dates to YYYYMMDD form or to an integer day number to make searching and sorting easier. If you're not confident with programming you could do this in SQLite using CASE for the month name. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users