On Thursday, September 20, 2012 11:59:31 PM UTC-7, desbest wrote:
>
>
> The image above describes the results I want, but here's a more graphical 
> explanation.
>
The reason I didn't see this originally is that Google Groups does not 
display images by default.  In the future, please do not embed images to 
posts, stick to plain text only or just include a link to the picture.  

As I said earlier, you need to disambiguate the columns you want.  The best 
way to do that is to explicitly list the columns to return, qualified by 
the appropriate table name.

  Post.where(:debate_id => view, :nodeview => 'status', :floor => 
0).join(:votes, :id=>:nodeview_id).select(:votes__debate_id, :votes__id, 
...)
 
Hopefully from there you can figure out how to get what you want.  If not, 
post the exact SQL you want to use, and I'll explain how to do produce it 
via Sequel.  If you don't know what SQL you want to use, learn SQL first.  
Sequel is designed to make it easier to access SQL databases by producing 
the SQL for you, but if you don't understand the underlying SQL concepts, 
you're in for an uphill climb.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/Y8YOdB9uoqoJ.
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.

Reply via email to