Extends aggregate SQL statements to allow sortations and correct slicing