activerecord aggregates

Possibly. According to active record's CHANGELOG, they've been in rails since 1.14.0: