title: How to select a random record for each group
body: <p>I have a table like</p>
  
  <pre><code> |    A   | B | C | D |
   |--------|---|---|---|
   | Value1 | x | x | x |
   | Value1 | y | x | y |
   | Value1 | x | x | x |
   |        ....        |
   | Value2 | x | x | x |
   | Value2 | x | x | x |
   | Value2 | x | x | x |
   |        ....        |
   | Value3 | x | x | x |
   | Value3 | x | x | x |
   | Value3 | x | x | x |
  </code></pre>
  
  <p>where <code>A</code> column can have one value from a set. I want to get a random record for each unique value in <code>A</code> column.</p>