Hello all,
I've been reading http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions,
but I'm having some trouble understanding how I would pull records within a
specific date range (last five days for example).
I was able to do something like this, which shows me that 7 days ago from
today (Nov 1) was the 24th:
select strftime('%d', 'now') - strftime('%d', 'now', 'start of year', '-7
days');
However I still don't understand it fully.
Here's my schema:
CREATE TABLE data (
id INTEGER PRIMARY KEY,
user_id varchar(30),
date varchar(30),
keywords varchar(1024),
log_files varchar(1024),
script varchar(30),
tracker_ip varchar(30),
user_ip varchar(30)
);
Basically I'd like to get output similar to the following:
5|25
3|26
7|27
2|29
4|30
These being the number of records logged for each day in the past 7 days,
the days being Oct 25 - Nov 1.
I'm not firing on all cylinders today, so I might be on the wrong track
altogether. Any assistance would be appreciated. Thanks!
Bobby
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users