Dreams:report: Difference between revisions
Jump to navigation
Jump to search
(→Related works from co-citations: Link to reports from related works panel) |
|||
Line 152: | Line 152: | ||
== Related works from co-citations == | == Related works from co-citations == | ||
{{SPARQL | query= | {{SPARQL | query= | ||
PREFIX target: <https://dreams.wikibase.cloud/entity/ | PREFIX target: <https://dreams.wikibase.cloud/entity/Q100> | ||
PREFIX dreams: <https://dreams.wikibase.cloud/entity/> | PREFIX dreams: <https://dreams.wikibase.cloud/entity/> | ||
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> | PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> | ||
SELECT | SELECT | ||
?score | |||
?work ?work_q | |||
?title ?titleUrl | |||
?dreams_work | |||
("Scholia ↗" AS ?scholia) ?scholiaUrl | |||
("Scholia ↗" AS ?scholia) | |||
WHERE { | WHERE { | ||
target: dreamst:P3 ?wikidata_q . | { | ||
SELECT | |||
(COUNT(*) AS ?score) | |||
?work ?title | |||
WHERE { | |||
target: dreamst:P3 ?wikidata_q . | |||
BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?wikidata_q)) AS ?wikidata) | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?wikidata (^wdt:P2860 | wdt:P2860) / (^wdt:P2860 | wdt:P2860)? ?work . | |||
FILTER (?wikidata != ?work) | |||
?work wdt:P1476 ?title . | |||
} | |||
} | |||
GROUP BY ?work ?title | |||
ORDER BY DESC(?count) | |||
LIMIT 500 | |||
} | } | ||
BIND(CONCAT("https://scholia.toolforge.org/work/", SUBSTR(STR(?work), 32)) AS ?scholiaUrl) | |||
BIND(SUBSTR(STR(?work), 32) AS ?work_q) | |||
OPTIONAL { | OPTIONAL { | ||
?dreams_work dreamst:P3 ?work_q . | ?dreams_work dreamst:P3 ?work_q . | ||
BIND(CONCAT("#report/", SUBSTR(STR(?dreams_work), 38)) AS ? | BIND(CONCAT("#report/", SUBSTR(STR(?dreams_work), 38)) AS ?titleUrl) | ||
} | } | ||
} | } | ||
}} | }} |