On Apr 4, 11:52 am, rohit <[email protected]> wrote: > How about this? > > ruby-1.8.7-p334 :001 > > DB[:checklists].select_append( DB[:marks].select{count(:*)}.filter( > :marks__checklist_id > => :checklists__id ).filter(:vote => 1).as(:votes_up) ) > => #<Sequel::Dataset: "SELECT *, (SELECT count(*) FROM marks WHERE > ((marks.checklist_id = checklists.id) AND (vote = 1))) AS votes_up > FROM checklists">
Oh, nice! I'd forgotten about virtual-row blocks. -- 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.
