Lets have a simple query:
SELECT myfield
FROM mytable
WHERE criteria
The above query gives us 10 rows of results for example. The field myField
is a text field.
My question is this: is it possible to alter the above query and get the total word count of the myField
field?
Edited: By total word count I mean the total word count of all selected fields in query, in all rows
Example
+------------------------------+-------+
| sentence | Words |
+------------------------------+-------+
| Hello World | 2 |
| Hello World | 2 |
| Mary had a little lamb | 5 |
| Her fleece was white as snow | 6 |
| Everywhere that mary went | 4 |
| Umm, sheep followed her | 4 |
+------------------------------+-------+