My bad - I had been using a 'group by' initially but it seemed to mess things up, so I removed it. Along the lines of answering the 2 queries: <pre> sqlite> select id,authorid,docid,title,source from docs order by id desc limit 5; 49|1009|1|Redeeming Charles Babbage's Mechanical Computer|Scientific American 1993-02 48|1008|1|A Partly True Story|Scientific American 1993-02 47|1007|1|Alphabet's Now Building Cities|Wired 2018-01-02 46|1006|1|The Talented Luthier|Scotland Magazine 2021-01 45|1005|1|Sean Connery|Scotland Magazine 2021-01 sqlite> select authorid,docid,keyword from keywords where authorid in (1005,1006,1007,1008,1009) order by id desc; 1009|1|Difference Engine 1009|1|Engineering 1009|1|Computer Technology 1008|1|Fuzzy Logic 1008|1|Mathematics 1007|1|Urban Design 1007|1|Smart City 1006|1|Art 1006|1|Luthier 1006|1|Music - Violin 1005|1|Scottish Ancestry 1005|1|Biography </pre> I can u/l the DB (~20KB) and let you know where it is.