A set of SPARQL examples that are used in different TGX resources
License: https://www.gnu.org/licenses/gpl-3.0
Uses method in: https://github.com/WDscholia/scholia/tree/master/scholia/app/templates/work_cito-incoming-chart.sparql
Work aspect: cito incoming chart
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
#defaultView:BubbleChart
PREFIX target: <http://www.wikidata.org/entity/Q28942417>
SELECT ?intention ?intentionLabel (COUNT(DISTINCT ?citingArticle) AS ?count) WHERE {
VALUES ?CITEDARTICLE { target: }
?citingArticle p:P2860 ?citationStatement .
?citationStatement pq:P3712 ?intention ;
ps:P2860 ?CITEDARTICLE .
?intention wdt:P31 wd:Q96471816 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
} GROUP BY ?intention ?intentionLabel
ORDER BY DESC(?count)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?CITEDARTICLE")
v4("?citationStatement")
v3("?citingArticle"):::projected
v6("?count")
v5("?intention"):::projected
c5([http://wikidata.org/entity/Q96471816]):::iri
c7([http://www.bigdata.com/rdf#serviceParam]):::iri
c9(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
bind0[/VALUES ?CITEDARTICLE/]
bind0-->v2
bind00(["wd:Q28942417"])
bind00 --> bind0
v3 --"p:P2860"--> v4
v4 --"p:qualifier/P3712"--> v5
v4 --"p:statement/P2860"--> v2
v5 --"p:direct/P31"--> c5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind2[/"count(?citingArticle)"/]
v3 --o bind2
bind2 --as--o v6