title: get all active record objects filtered for unique by one attribute
body: <p>Is it possible to query a model object and filter results by one or more columns for uniqueness?</p>
  
  <p>I should qualify this with, taking the first unique record and ignoring the rest is fine.</p>
  
  <p>My usual method is to query the object and pluck uniq ids or whatever and run another query.</p>
  
  <p>Lets say I had a set like this:</p>
  
  <blockquote>
    <p>Test id: 24997, test_id: 7, group_id: 5408,</p>
    
    <p>Test id: 25001, test_id: 7, group_id: 5412,</p>
    
    <p>Test id: 25002, test_id: 8, group_id: 5413,</p>
    
    <p>Test id: 25004, test_id: 8, group_id: 5415,</p>
    
    <p>Test id: 25007, test_id: 9, group_id: 5417,</p>
    
    <p>Test id: 25008, test_id: 9, group_id: 5299</p>
  </blockquote>
  
  <p>I would like to have results like this. Unique by the test_id column:</p>
  
  <blockquote>
    <p>Test id: 24997, test_id: 7, group_id: 5408,</p>
    
    <p>Test id: 25002, test_id: 8, group_id: 5413,</p>
    
    <p>Test id: 25007, test_id: 9, group_id: 5417</p>
  </blockquote>
  
  <p>I suppose for completeness. Let's say this is a through table with multiple columns. How could I get unique records by two or more columns?</p>