title: mark first time a value appears in a table
body: <p>I have a table with referrers:</p>
  
  <pre><code>`date       | referrer             | new?
  2015-01-01  example.com/link.php  
  2015-01-02  example.com/link.php
  2015-01-03  example.com/link.php
  2015-01-01  someotherlink.com
  2015-01-03  someotherlink.com`
  </code></pre>
  
  <p>Now I'd like to set the field new to true if it is the first occurence of a referrer. </p>
  
  <pre><code>`date       | referrer             | new?
  2015-01-01  example.com/link.php    true
  2015-01-02  example.com/link.php
  2015-01-03  example.com/link.php
  2015-01-01  someotherlink.com       true
  2015-01-03  someotherlink.com`
  </code></pre>
  
  <p>The table gets updated daily and the first time I have a larger timeframe for which I'd like to mark the first occurence.</p>
  
  <p>Any ideas? For the daily update I could just check whether a referrer already exists before entering it in the table, but I think there is one SQL statement which can do it for all values in the table and which I only run once daily after updating the table.</p>