This section gives the detail of O-SQL-AG the online version of SQL-AG. This version allows the user to define the online version of an aggregate. The only difference between SQL-AG and O-SQL-AG is the pre-compiler. The code generated by the two versions is different. O-SQL-AG supports all the functionality of SQL-AG, with slight variations in the usage. O-SQL-AG uses a pre-defined package Aggpackage. Packages are a pre-defined object type in PL/SQL allowing the user to support global variables and grouping of sub programs. The file package.sql contain the PL/SQL source code for the package aggpackage.