title: Removing duplicates in InfluxDB
body: <p>I would like to perform a query to remove duplicates. What I define as a duplicate here is a measurement where we have more than 1 data point. They will have different tags, so they are not overwritten by default but I would like to remove the oldest inserted, regardless of the tags.</p>
  
  <p>So for example, measurement of logins (it doesn't really make sense but it's to avoid using abstract entities):</p>
  
  <pre><code>&gt; Email   | Name    | TS         | Login Time
  &gt; 
  &gt; a@a.com | Alice   | xxxxx1000  | 2017-05-19
  &gt; a@a.com | Alice   | xxxxx1000  | 2017-05-18
  &gt; a@a.com | Alice   | xxxxx1000  | 2017-05-17
  &gt; b@b.com | Bob     | xxxxx1000  | 2017-05-18
  &gt; c@c.com | Charlie | xxxxx1200  | 2017-05-19
  </code></pre>
  
  <p>I would like to remove the second and third line, because the data point has the same timestamp as the first, it is the same measurement but they have different login times and I would like to take only the last. </p>
  
  <p>I know well that I could solve this with a query, but the requirement is more complex than this (visualization in Grafana of weird KPI data) and I need to remove actual duplicates (generated and loaded twice).</p>
  
  <p>Thank you.</p>