title: Redshift select random records but avoid duplicate
body: <p>I have a table in Redshift where I have following records for a sample ID 71082:</p>
  
  <pre><code>id       trm_num        start_time
  71082   PCMAMGA759551   2012-05-02 09:41:54
  71082   PCMAMGA759551   2015-06-02 13:23:39
  71082   PCMAMGA759551   2015-09-03 13:23:39
  71082   PCMAMGA759551   2015-12-11 07:25:25
  71082   PCMAMGA759551   2017-01-10 09:03:22
  </code></pre>
  
  <p>I want to choose only 1 random record for every id.
  For this I tried the query : </p>
  
  <pre><code>select * from mytable where id=71082 order by random limit 1;
  </code></pre>
  
  <p>it fetched me random record.But the table has 1000s of different ids.How can I modify my query for the other ids?</p>