1 Summary Practical database query languages are usually equipped with some aggregate functions. For example, \\nd mean of column" can be expressed in SQL. However, the manner in which aggregate functions were introduced in these query languages leaves something to be desired. Breazu-Tannen, Buneman, and Wong 3] introduced a nested relational language NRC(=) based on monads 16, 24] and structur...