Is it possible to get (through an SQL query) a number telling me what's the average length of some fields in a text column? Imagine that newspaper staff want to see what's the average length of an article in their archive. How would you solve this?
I would be very, very thankful for clarity on this.
If I could figure out how much data is in a result set I could divide it by the number of hits to get the average I guess. But I don't know how to do this either. Can it be done?
I'm hoping to be able to connect to all kinds of databases, so in the best case this can be done seemlessly in all dialects of SQL. But if you know a type-specific solution I'd be happy to know as well. I thought this would be simple but I can't find the answer anywhere.