/ Published in: SQL
My texts are a combination of fields, this is arranged by adding them one by one.
Expand |
Embed | Plain Text
SELECT aid, published_date, header, published_state, SUM(1+ LENGTH(introduction3) - LENGTH(REPLACE(introduction3, ' ',''))) + SUM(1+ LENGTH(body) - LENGTH(REPLACE(body, ' ',''))) + SUM(1+ LENGTH(outro3) - LENGTH(REPLACE(outro3, ' ',''))) AS Wordcount FROM article_tbl GROUP BY aid HAVING published_state = 1 ORDER BY Wordcount DESC
You need to login to post a comment.
