So this is more of an arel question than anything but here\'s what I am trying to do.
I have three objects lets say, called Items
For Mysql, your can use group with ONLY_FULL_GROUP_BY disabled,
group
Item.group(:name).to_sql => "SELECT `items`.* FROM `items` GROUP BY name"
See Is there ANY_VALUE capability for mysql 5.6?