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.