My database table looks like this:
id | articleId | createDate | modifiedDate | content |
---|---|---|---|---|
1 | 145 | 01.01.2021 | 01.01.2021 | blabla |
2 | 145 | 01.01.2021 | 02.01.2021 | blabla |
3 | 145 | 01.01.2021 | 03.01.2021 | blabla |
4 | 146 | 02.10.2021 | 02.10.2021 | blabla |
5 | 147 | 05.04.2021 | 05.04.2021 | blabla |
6 | 147 | 05.04.2021 | 07.04.2021 | blabla |
So if a content is updated and saved again, then it is saved again in DB with modified date and same articleId. What I'm try to get is all content (latest ,not repeated) which are containing word "blabla".
I have written this query
SELECT * FROM db where content like '%blabla%' group by articleId
but this didnt work. Do you have any idea?