*A place for all lessons and snippets of programming. This includes *Templater, Linter, Dataview and basically anything else that requires a PhD to understand
disabled via “ because this page has so much data on it from all the calls
$= dv.span(dv.current())
Search by tag, relative date, and group by specific property
let l1 = dv.pages("#Application and #industry").where(t => t.Created && moment(t.Created).format('yyyy-MM-DD HH:mm') > cutoff)let l2 = l1.groupBy(t => t.tags.filter(x => x.includes("industry")))```
Dataview DQL
Group and count files by time interval, with ctime limit
TABLE length(rows) as Count FROM #application WHERE (file.ctime >= (date(today) - dur(12 week)))SORT file.ctime DESCGROUP BY dateformat(file.ctime, "DD") as day
Return list of tags
make sure you DO NOT include a target variable next to List. Apparently it will get added on its own when you declare as
LISTFROM #Application FLATTEN file.tags as tagGROUP BY tagWHERE icontains(tag, "#industry")
Search by certain tag, but omit other tags in results
TABLE WITHOUT ID file.link as Company, filter(file.etags, (x) => contains(x, "industry")) asIndustry, Checked as Last_CheckedFROM #newcompany and #industry/Materials SORT Checked ASC
Search by other (text, binary) metadata
The ‘sport_type’ variable is a text field. To search for empy binarys use WHERE !complete
TABLE WITHOUT ID file.link as Link, distance as Dist
FROM Strava
WHERE sport_type = “Run”
:> ```