sparql-examples

A set of SPARQL examples that are used in different TGX resources

View the Project on GitHub BiGCAT-UM/sparql-examples

159

rq turtle/ttl

Publisher aspect: most cited

Use at

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 target: <http://www.wikidata.org/entity/Q73820>

# Count the number of citations for each journal published by a specified publisher
SELECT
  ?number_of_citations
  ?work ?workLabel ?journal ?journalLabel 
WITH {
  SELECT ?work ?journal (COUNT(?citing_work) AS ?number_of_citations) WHERE {
    ?journal wdt:P123 target: .
    ?work wdt:P1433 ?journal .
    ?citing_work wdt:P2860 ?work
  }
  GROUP BY ?work ?journal
  ORDER BY DESC(?number_of_citations)
  LIMIT 500  
} AS %result
WHERE {
  INCLUDE %result
  # Label the result
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" . } 
}
ORDER BY DESC(?number_of_citations)

graph TD