title: Getting the last row with a certain column from each day in SQL
body: <p>I have a table called logs that consists of a few columns.</p>
  
  <p>id | state | result | timestamp</p>
  
  <p>I need to all the rows with the state 'success-changed', but they appear at random, some days they don't and some they do twice. So in cases there is more than one per day I need to get the last one.</p>
  
  <p>Can someone show me how to do it?</p>
  
  <p>Thanks!</p>