On Nov 15, 2009, at 3:25 AM, André Allavena wrote: > I'm doing are a little different (I often need to go down to SQL to do > things like select sum(col1 - col2) group by col 3
FWIW: irb(main):001:0> require 'sequel' => true irb(main):002:0> DB = Sequel.sqlite; DB.quote_identifiers = false => false irb(main):003:0> DB[:foo].select( :sum.sql_function(:col1 - :col2) ).group_by( :col3 ) => #<Sequel::SQLite::Dataset: "SELECT sum((col1 - col2)) FROM foo GROUP BY col3"> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
