sparql-examples

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

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

136

rq turtle/ttl

Podcast aspect: seasons

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 wd: <http://wikidata.org/entity/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX target: <http://www.wikidata.org/entity/Q124262264>

SELECT DISTINCT ?season ?seasonLabel
  (CONCAT("/podcast-season/", SUBSTR(STR(?season), 32)) AS ?seasonUrl)
  (MAX(?count) AS ?episodeCount)
WHERE {
  ?season wdt:P31 wd:Q69154911 ; wdt:P179 target: .
  OPTIONAL {
    ?season wdt:P1113 ?count .
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
} GROUP BY ?season ?seasonLabel ?seasonUrl

graph TD