next up previous contents
Next: Name of Employees Up: Applications of SQL-AG Previous: Tables

Average

  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.



Punit Bhargava
Wed Mar 11 18:50:53 PST 1998