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/pathway_citing-articles.sparql
Pathway aspect: citing articles
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
#defaultView:Table
PREFIX target: <http://www.wikidata.org/entity/Q28031254>
SELECT ?citations ?publication_date ?citing_work ?citing_workLabel
WITH {
SELECT
(MIN(?date) AS ?publication_date)
(COUNT(?citing_citing_work) AS ?citations)
?citing_work
WHERE {
?citing_work wdt:P2860 target: .
OPTIONAL {
?citing_work wdt:P577 ?datetime .
BIND(xsd:date(?datetime) AS ?date)
}
OPTIONAL { ?citing_citing_work wdt:P2860 ?citing_work }
}
GROUP BY ?citing_work
} AS %result
WHERE {
INCLUDE %result
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" . }
}
ORDER BY DESC(?citations) DESC(?date)
graph TD