"P Kishor" <[EMAIL PROTECTED]> wrote in
message
news:[EMAIL PROTECTED]
> Given a table t (name, date)
>
> I want to find all rows within, say, 6 months of a specific row, say
> name = 'foo'. So, I am doing
>
> SELECT name
> FROM t
> WHERE
>(SELECT julianday(date) FROM t WHERE name = 'foo')
Given a table t (name, date)
I want to find all rows within, say, 6 months of a specific row, say
name = 'foo'. So, I am doing
SELECT name
FROM t
WHERE
(SELECT julianday(date) FROM t WHERE name = 'foo') -
julianday(date) < 180 OR
julianday(date) - (SELECT julianday(date) FROM
2 matches
Mail list logo