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-season_episodes.sparql
Podcast-season aspect: episodes
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/Q124266519>
SELECT DISTINCT ?episode ?episodeLabel
(CONCAT("/podcast-episode/", SUBSTR(STR(?episode), 32)) AS ?episodeUrl)
WHERE {
?episode wdt:P31 wd:Q61855877 ; wdt:P4908 target: .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?episode"):::projected
v2("?episodeUrl")
c6([http://www.bigdata.com/rdf#serviceParam]):::iri
c8(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
c2([http://wikidata.org/entity/Q61855877]):::iri
c4(["wd:Q124266519"]):::iri
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P4908"--> c4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind0[/"concat('/podcast-episode/',substring(str(?episode),'32^^xsd:integer'))"/]
v1 --o bind0
bind0 --as--o v2