Getting average of serviceTime from system:completed_requests

I need help for formulating another query to find average on serviceTime system:completed_request collection.
select AVG(serviceTime ) from system:completed_requests
gives null result as serviceTime is stored as string and it has result in ms and s units both like
13.628403513s and 998.868594ms

USE STR_TO_DURATION() convert to nanoseconds

https://docs.couchbase.com/server/6.0/n1ql/n1ql-language-reference/datefun.html#fn-date-str-to-duration

Thanks @vsr1 its helps a lot