title: Seek rows with incorrect dates in historic data
body: <p>I had a table that is an historic log, recently I fixed a bug that was writing in that table an incorrect date, the dates should be correlatives, but in some cases there was a date that wasn't it, so much older than the previous date.</p>
  
  <p>How can I get all the rows that aren't correlatives for each entity_id? In the example below I should get the rows 5 and 10.
  The table has millions of rows and thousand of differents entities. I was thinking to compare the results of ordering by date and id but that is a lot of manual work. </p>
  
  <pre><code>| id     | entity_id   | time_stamp    |
  |--------|-------------|---------------|
  | 1      | 7           | 2019-01-22    |
  | 2      | 9           | 2019-01-05    |
  | 3      | 6           | 2019-03-14    |
  | 4      | 9           | 2019-04-20    |
  | 5      | 6           | 2015-10-04    | WRONG
  | 6      | 9           | 2019-07-15    |
  | 7      | 3           | 2019-07-04    |
  | 8      | 7           | 2019-06-01    |
  | 9      | 6           | 2019-11-04    |
  | 10     | 7           | 2019-03-04    | WRONG
  
  </code></pre>
  
  <p>Are there any function to compare the previous date by the entity id? I'm completely lost here, not sure how to clean the data. The database is MYSQL by the way.</p>