Example. Given a document, return the count of the number of authors.
return integer as
select count(author-list)
from one-doc
from doc
where author-count(doc) > 1
create function author-count(one-doc Document)
select name
However, since the code needs to be loaded and executed with the database system code, it may carry the risk of