1. A non-transitory computer program product storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising: accessing an ordered history table of a relational database, the ordered history table comprising a plurality of commit identifiers associated with one or more of updates, insertions, and deletions to values in the database table, the ordered history table comprising a sequential listing of the commit identifiers associated with first occurrences of changes to one or more of the values; traversing the ordered history table in a single pass to calculate an aggregation function using an optimized algorithm, the optimized algorithm enabling calculation of an aggregated metric of the values based on a selected method for tracking invalidated values to their corresponding commit identifiers; generating the calculated metric for a current version of the database table; and promoting the calculated metric.