# Find that includes :group and :order or :distinct

**URL:** <https://www.ruby-forum.com/t/find-that-includes-group-and-order-or-distinct/133877>\
**Category:** Rails\
**Created:** [April 4, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/find-that-includes-group-and-order-or-distinct/133877 "2008-04-04T16:07:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcano](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e19adc/32.png) [@fcano](https://www.ruby-forum.com/u/fcano)\
**Post date:** [April 4, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/find-that-includes-group-and-order-or-distinct/133877/1 "2008-04-04T16:07:39Z")

</div>

Hi forum,  
The situation is that I have a table called nextactions with:  
id, name, project\_id, position  
So each nextaction belongs to a project and each project have many  
NextActions.  
I was just wondering if with just one find sentence I can retrieve all  
the nextactions with the lower position and just one nextaction  
belonging to one project.
