I am running the following sql query:
db2 "select (integer(length(message))), count(*) from db2.logging where date(datestamp) = '2008-09-01' AND (integer(length(message))) BETWEEN 1000 AND 5000 GROUP BY length(message)"
I am getting a count of the messages as expected e.g.:
1 2
--------- -----------
1000 5
1005 2
1110 50
However, what I want is the sum of count field (2) i.e. in the above example 57 - is there any way of doing this?