I’m working on a queries for my contacts in Logseq and I’m struggling with how to translate this into Datascript.
I have each contact as a page (with a
contact tag and a
list:: A property. Notes in the Journal pages link to the contacts. I’m trying to find the pages where there are no notes in the last two weeks (implying I need to reach out to them again and make more notes).
This would be a LEFT JOIN in SQL, but I’m struggling to translate that into Datascript. Pseudo SQL Would look something like this:
WITH JournalData AS (
SELECT JournalID, JournalLinks
WHERE JournalDate > CURRENTDATE() - DAYS(14)
LEFT JOIN JournalData
ON JournalData.JournalLinks = PageName
WHEREJournalData. JournalID IS NULL
I can get the individual journals, and the individual contact pages, but I’m having trouble getting them together and capturing the missing ones instead of what’s present.
Thank you for any and all help!