From: "Mark Van De Vyver" <mvy...@gmail.com>
Date: Tue, 6 Nov 2007 21:23:47 +1100
Local: Tues, Nov 6 2007 5:23 am
Subject: Re: help with aggregation & group by
I'm sold, I've just seen the :table__field___alias
syntax too :) On Nov 6, 2007 8:40 PM, Sharon Rosner <cico...@gmail.com> wrote: > > from :c => Customer, :b => Bank, :a => Account > > appeared simpler than having blocks and .AS, but no doubt there is a > Actually for that kind of thing you can specify your filter as a hash: > where(:firstname => [first1, first2]) > Notice how you can provide an array and Sequel takes care of > ... WHERE firstname IN ('john', 'george') > If you need to qualify the field name you can use the special symbol > where(:c__firstname => [first1, first2]) > Sequel also lets you use any comparison operator, not just ==: > where {:price > 100} > You can also specify mathemtic expressions and compare against other > where {:price < :avg[:price] - 100} > Have a look at the cheat sheet: > http://code.google.com/p/ruby-sequel/wiki/CheatSheet > sharon You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||