Im trying to do a SELECT * to retrieve rows for l开发者_StackOverflow社区ast 7 days in SQLite.
the table structure is as follows
CREATE TABLE 'session' ('rowID' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , 'steps' INTEGER, 'stop_time' DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP)
How do I do this? Im new at this
SELECT * FROM session WHERE stop_time > (SELECT DATETIME('now', '-7 day'))
Refer to the documentation
精彩评论