title: how to select/delete all rows except within 24 hours before from current time in sqlite
body: <p>i have a table named <strong>daily_mood</strong> and it has three (3) columns, looks like below:</p>
  
  <pre><code>CREATE TABLE daily_mood (moodid INTEGER PRIMARY KEY autoincrement,mood TEXT,mooddate DATETIME)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/tswP9.png" alt="enter image description here"></p>
  
  <p>it's data looks like that:
     <img src="https://i.stack.imgur.com/Jgwp6.png" alt="enter image description here"></p>
  
  <p>Now, i want to select/delete all rows except from current date to before 24 hours exactly according to mooddate column.</p>
  
  <p>i tried this query like:</p>
  
  <pre><code>SELECT *from daily_mood where mooddate&gt;=datetime('now', '-1 day');
  </code></pre>
  
  <p>the result should be 1 row(last one) from above data.but here comes 2.like<img src="https://i.stack.imgur.com/kPAtJ.png" alt="enter image description here"></p>
  
  <p>results should be the last row. Anyone can help me? thanks.</p>