Article Statistics Word count
Article table
ID author Titile content
How to count the number of articles each author has and the number of articles I have to rank from more to less
Is the first to show the maximum number of articles (how many are displayed) total article content word count
Next, use the list to show each title
The second one is to show the number of articles second
Analogy
I don't have a lot of trouble thinking about myself, and I want to learn a good idea.
------Solution--------------------
What are you going to do to explain it in detail? If it's just a simple statistic, I can tell you that world can count the number of words in the article.
------Solution--------------------
SQL Code
Select ID, Titile, SUM (LENGTH (Titile)) as Lengthfrom ' your_table ' where author = ' ". $author." ' ORDER by LENGTH des C
------Solution--------------------
SQL Code
Select COUNT (*) as Count, author,sum (content), Group_concat (title) group by Authororder by Count DESC
------Solution--------------------