I am working in Android with SQLite.
My db has 2 tables:
Table 1: cars
_id(int,pri-key)
reg(text)
type(text)
Table 2: jobs
_id(int,foreign-key)
date(date)
I need a sqlite statment which will get me all cars which have NOT had a job in the past 3 weeks. Iam actually porting the app from c#, and the statment I use for this (in MySQL) is
SELECT c.id, c.reg, c.type FROM buses c WHERE NOT EXISTS (SELECT NULL FROM jobs j WHERE j.id = c.id AND j.date >= CURRENT_DATE - INTERVAL 21 DAY
But the SqliteDataBase Object I am working with in android takes a different format, How would I run this query?
Thanks in advance.