What is the average comments length on Stack Overflow?
I'm working on my Thesis about Short Message Topic Detection (on Twitter, to be more specific) and I would like to know that for research purposes.
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.Sign up to join this community
To get the precise value, one should use floating-point arithmetic. The query is:
SELECT AVG(CAST(LEN(Text) AS FLOAT)) FROM Comments
This gives 145.98293005330171, or very close to 146. Beware of integer division when your result is not an integer!
Interesting features in the graph of the distribution include:
SELECT SUM(CAST(LEN(Text) as bigint))/COUNT(*) FROM Comments;