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.
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;