next up previous contents
Next: Rollups for Data Up: Applications of SQL-AG Previous: Average

Name of Employees with Maximum Salary

  This example finds the name of all the employees with maximum salary. Since in this case the state of the aggregate needs to be a record with one of the elements being the table, a table of type t_stringtable (table_of_name) is declared to store the names of the employees with current maximum. The specification in SQL-AG for the aggregate is given in appendix A. After using SQL-AG a stored PL/SQL procedure named maxname is created. Example calls to the procedure along with the output follows.



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