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/venue_outgoing-bubble.sparql
Venue aspect: outgoing bubble
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/Q6294930>
SELECT ?cito ?intentionLabel (COUNT(DISTINCT ?citingArticle) AS ?count) WHERE {
?citingArticle p:P2860 ?citationStatement ;
wdt:P1433 target: .
?citationStatement pq:P3712 ?intention ;
ps:P2860 ?citedArticle .
?intention wdt:P31 wd:Q96471816 ;
wdt:P2888 ?cito .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
} GROUP BY ?cito ?intention ?intentionLabel
ORDER BY DESC(?count)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?citationStatement")
v5("?citedArticle")
v2("?citingArticle"):::projected
v6("?cito"):::projected
v7("?count")
v4("?intention")
c3(["wd:Q6294930"]):::iri
c7([http://wikidata.org/entity/Q96471816]):::iri
c10([http://www.bigdata.com/rdf#serviceParam]):::iri
c12(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
v2 --"p:P2860"--> v3
v2 --"p:direct/P1433"--> c3
v3 --"p:qualifier/P3712"--> v4
v3 --"p:statement/P2860"--> v5
v4 --"p:direct/P31"--> c7
v4 --"p:direct/P2888"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end
bind1[/"count(?citingArticle)"/]
v2 --o bind1
bind1 --as--o v7