The solution for aggregation of timestamp durations is to use timestampdiff , a built - in udf user defined function that is included with db2 udb , as shown in the following example 解決持續(xù)時(shí)間的聚合問題可以使用timestampdiff ,如下面的樣本實(shí)例中所顯示,它是使用db2 udb實(shí)現(xiàn)的嵌入式udf (用戶定義的功能) 。