diff --git a/lib/arel/nodes/sql_literal.rb b/lib/arel/nodes/sql_literal.rb index 6471469d9f..7299fb1d45 100644 --- a/lib/arel/nodes/sql_literal.rb +++ b/lib/arel/nodes/sql_literal.rb @@ -5,6 +5,10 @@ module Arel Count.new [self], distinct end + def sum + Nodes::Sum.new [self], Nodes::SqlLiteral.new('sum_id') + end + def maximum Nodes::Max.new [self], Nodes::SqlLiteral.new('max_id') end