Mean calculation of Age using timestampdiff function
Hello,
I'm trying to work out the mean age for customers in a report however I'm having trouble composing an expression get the mean value, below is the process I've followed so far.
COMPONENTS:
timestampdiff(SQL_TSI_YEAR, Date of Birth, CURRENT_DATE ) - This gives me each persons AGE
SUM("CustomObject14 Metrics"."# of CustomObject14s") - This gives me total number of people.
SUM THE AGE:
SUM(timestampdiff(SQL_TSI_YEAR, Date of Birth, CURRENT_DATE )) - Should give me the total sum of ages?? Not sure this actually works though as the total value is not repeated per row like SUM("CustomObject14 Metrics"."# of CustomObject14s")