Hi I wonder how I can calculate number of back links in certain page. Say I collect Links (articles, tweets) and tags them with properties include one called Topics, where I spell out which topic this links is referenced to. Then I have a query to pull out all Topics : {{Query (page-property type [[topics]]}} . But I can’t see number of Links each Topic is back linked to.
Under All Pages, I can see number of back links but I don’t know how to filter by pages that are only topic.
Thanks, here you go! I guess this involved in Aggregating function.
" I collect articles as reference links (“Links”) and assign them to Topics (“Topics”). I need to calculate how many links each topic has collected as an indicator which topic is the priority to work on (the one with the most reference links). Currently the Links’s property include "Type:: Link , Topic:: Topic 1, Topic 2 " ; a topic’s property include “Type:: topic ; "
I guess I can use Sum or Max function but I have no experience in using them. Maybe I can add a property like " Reference-count:1 " so the query can count the value ('1”) if so whats the full query look like ? Thank so much!
Hi there ! Somehow it didn’t return any result. While I am RE-exam the prospect to fit into your scrip, I just learned Logseq does have a SUM function. https://docs.logseq.com/#/page/64076691-bea5-429c-a43c-dc9ea8e31e01
Do you think in my case , I can include property “qty” for each link and because each link gets to count once, so by default qty::1 . Then use SUM to calculate the total Links for each Topic. If so do you know how should I write the query? And how can I have the count of total links showed up like under All Pages , back links automatically showed up in the table as a column? I hope I made myself clear . :-p ) if not I can do a few rendering or screenshot to explain.
As you can see in the example on the site, you would need a query per topic.
Because it would do a sum across the table.
I’m more curious as to why you do not get any results from my query.
Here’s a screenshot of what the article page looks like:
Hi I am still trying using the query here. Just so you know under a Topic , which is a page, I have property type such as type:: [[topics]] but I don’t have a property as topic:: ( title of the topic) . Should I add the later in order to run your query?
Thank you!