Similar to SQL-AG user uses the pre-compiler Aggregate and the text file text.sql to generate the procedure in a file generated.sql. User gives the following command :
Here filename.spec contains the specification of the aggregate in SQL-AG. Along with a package aggregatename_package, following stored PL/SQL procedure is created: