title: How to remove large data spikes from MySQL Table
body: <p>I have a database that is fed into a graph. For some reason or another every now and then, my PHP script inserts really large spikes into my database...</p>
  <p>For example: <a href="https://i.stack.imgur.com/IpT6t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IpT6t.png" alt="Screenshot" /></a></p>
  
  <p>As you can see there are random spikes in the graph where the data sometimes goes from 300 upto 3000 then straight back down to 300 again.</p>
  <p>What I need is a way to tidy up these tables and remove data where it is massively larger than the previous and next rows.</p>
  <p>I've done a bit of google research but can't come up with anything!</p>
  <p>Thanks in advance.</p>