I was trying to get the average solution time of issues in Redmine per tracker type. In order to get the average time, I first selected creation time of issue and extracted it from the date of solution of the issue (this doesn’t mean it is closed, it is to say status is updated with the id =X), after that I listed the average of each day.
Some mathematical functions of MySQL could be a useful. Here they are:
CEIL() and CEILING()
They both are the same function.
Returns the smallest integer value not less than our number.
SELECT CEILING (2.56) or SELECT CEIL(2,5)
SELECT CEILING (-2.56);
Floor() returns the largest integer value not greater then our number
Round() can be used by providing one argument only or with number of decimal places. Here how it works:
This is all.