fix syntax for sum aggregate