Abstract:
In one embodiment, a method receives a query for analyzing data in a database. The query includes a first level calculation that is performed before a second level calculation. When an operator associated with the first level calculation is present in the query, the method performs: calculating the first level calculation by removing group by information for a reference characteristic for the first level calculation to determine a first level calculation result and calculating the second level calculation using the first level calculation result using the group by information for the reference characteristic to determine a second level calculation result, wherein the group by in the second level calculation combines groups of rows in a database table of the database that have the same content in their specified columns.