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/podcast_seasons.sparql
Podcast aspect: seasons
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