2010/5/31 Jeremy Evans <[email protected]>
>
> First, you are using non-standard SQL. You generally can't select *
> and group by a column, as all columns selected must either be grouped
> by or used in a aggregate function.
OK, thanks, i didn't know that, in fact, using Sequel asks for a deeper
understanding of sql.
> I'm guessing you are using MySQL,
> which allows this nonstandard behavior.
no i'm using SQlite 3.
> You are only going to get one
> row for each name because you are grouping on name. This should do
> what you want:
>
ah ok, my output was of a group memeber.
>
> DB[:applications].filter(:name=>DB[:applications].select(:name).group_by(:name).having{|
> o| o.count(:name) > 1}).order(:name)
>
>
works fine, as what i wanted !
thanks again,
Yvon
--
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.