SQLite Forum

SELECT question
Login
You could also use a simple correlated subquery if all you wanted was the concat of the applicable keywords:

```
  select docs.id, 
         docs.title AS Title, 
         authors.author AS Author, 
         docs.source) AS Source,
         (
          select group_concat(keyword)
            from keywords
           where docid == D.docid
             and authorid == D.Authorid
         ) as Keywords
    from docs, authors
   where docs.authorid == authors.authorid
     and docs.docid == author.docid
order by docs.id desc
   limit 5
;
```