title: How to make Active Record join return unique objects?
body: <p>I have a simple query need: Find a list of users who made an order since Jan 1, 2013.</p>
  
  <p>In SQL, it's a very simple query.</p>
  
  <p>But I'm using Rails and Active Record.</p>
  
  <p>So I wrote: <code>User.joins(:orders).where("orders.created_at &gt;= '2013-01-01 00:00:00'")</code>    </p>
  
  <p>In our database, we have 100 orders made since 01/01/2013 by 75 users.  (Some users made more than one order apparently.)</p>
  
  <p>However, the expression above returns 100 users.  (There must be duplicates.)</p>
  
  <p>I tried <code>User.joins(:orders).where("orders.created_at &gt;= '2013-01-01 00:00:00'").uniq</code></p>
  
  <p>That doesn't work either.</p>
  
  <p>How can I get the 75 users who've made an order since 01/01/2013?</p>