On Aug 3, 11:17 pm, k(dot)(dot)(dot)(at)denninger(dot)net (Karl Denninger) wrote:
> Ideas?
SELECT item.user, item.subject, item.number
FROM item, seen
WHERE item.user = seen.user
AND item.number = seen.number
AND item.changed > seen.lastviewed
UNION
SELECT item.user, item.subject, item.number
FROM item, seen
WHERE item.user = seen.user
AND seen.number IS NULL
AND item.changed > seen.lastviewed;