i have a table named daily_mood and it has three (3) columns, looks like below:
CREATE TABLE daily_mood (moodid INTEGER PRIMARY KEY autoincrement,mood TEXT,mooddate DATETIME)
it's data looks like that:
Now, i want to select/delete all rows except from current date to before 24 hours exactly according to mooddate column.
i tried this query like:
SELECT *from daily_mood where mooddate>=datetime('now', '-1 day');
the result should be 1 row(last one) from above data.but here comes 2.like
results should be the last row. Anyone can help me? thanks.