query-a40735e92bd92d41f698b36457c837a0
Forward cited work
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q107060118>
SELECT
?citations
?cited ?citedLabel
(CONCAT("#work/", SUBSTR(STR(?cited), 32)) AS ?citedUrl)
WHERE {
{
SELECT
(COUNT(?citing) AS ?citations)
?cited
WHERE {
{
SELECT DISTINCT
?citing ?cited
WHERE {
{
BIND(target: AS ?citing)
target: wdt:P2860 ?cited
}
UNION
{
target: wdt:P2860 ?citing .
?citing wdt:P2860 ?cited .
}
UNION
{
target: wdt:P2860 / wdt:P2860 ?citing .
?citing wdt:P2860 ?cited .
}
UNION
{
target: wdt:P2860 / wdt:P2860 / wdt:P2860 ?citing .
?citing wdt:P2860 ?cited .
}
}
} ?citing wdt:P2860 ?cited .
}
GROUP BY ?cited
ORDER BY DESC(?citations)
LIMIT 500
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?citations)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?citations"):::projected
v3("?cited"):::projected
v4("?citedUrl")
v2("?citing")
a1((" "))
a2((" "))
a3((" "))
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c1([http://www.wikidata.org/entity/Q107060118]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P2860"--> a2
a2 --"wdt:P2860"--> a3
a3 --"wdt:P2860"--> v2
v2 --"wdt:P2860"--> v3
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P2860"--> a1
a1 --"wdt:P2860"--> v2
v2 --"wdt:P2860"--> v3
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
c1 --"wdt:P2860"--> v2
v2 --"wdt:P2860"--> v3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
bind0[/"http://www.wikidata.org/entity/Q107060118"/]
bind0 --as--o v2
c1 --"wdt:P2860"--> v3
end
union0r <== or ==> union0l
end
v2 --"wdt:P2860"--> v3
bind2[/"count(?citing)"/]
v2 --o bind2
bind2 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end
bind3[/"concat('#work/',substring(str(?cited),'32^^xsd:integer'))"/]
v3 --o bind3
bind3 --as--o v4