This example finds the average for any field of a table and outputs the
current estimate every 5 record. The following is the specification of
the aggregate in SQL-AG.
By invoking the pre-compiler a stored PL/SQL procedure named average is created. Following is a call to the procedure along with the output. (These commands were given at the sqlplus command line prompt)
More example calls to the procedure are given in appendix B.