query-b92df31979cd216298de34c8a3f2b27f
Traditional knowledge SELECT ?opera ?operaLabel ?composerLabel (YEAR(?inception) AS ?year) ?basedOn ?basedOnLabel ?firstPerformanceDate ?languageLabel ?librettistLabel ?fullWork ?dedicatedToLabel (URI(REPLACE(STR(?enwiki), "/wiki/", "/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=")) AS ?synopsis) WHERE { ?opera wdt:P31/wdt:P279* wd:Q1344 . OPTIONAL {?opera wdt:P86 ?composer} OPTIONAL {?opera wdt:P571 ?inception} OPTIONAL {?opera wdt:P144 ?basedOn} OPTIONAL {?opera wdt:P1191 ?firstPerformanceDate} OPTIONAL {?opera wdt:P407 ?language} OPTIONAL {?opera wdt:P87 ?librettist} OPTIONAL {?opera wdt:P953 ?fullWork} ?enwiki schema:about ?opera; schema:isPartOf https://en.wikipedia.org/. OPTIONAL {?opera wdt:P825 ?dedicatedTo} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Traditional knowledge
SELECT ?opera ?operaLabel
?composerLabel
(YEAR(?inception) AS ?year)
?basedOn ?basedOnLabel
?firstPerformanceDate
?languageLabel
?librettistLabel
?fullWork
?dedicatedToLabel
(URI(REPLACE(STR(?enwiki), "/wiki/", "/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=")) AS ?synopsis)
WHERE {
?opera wdt:P31/wdt:P279* wd:Q1344 .
OPTIONAL {?opera wdt:P86 ?composer}
OPTIONAL {?opera wdt:P571 ?inception}
OPTIONAL {?opera wdt:P144 ?basedOn}
OPTIONAL {?opera wdt:P1191 ?firstPerformanceDate}
OPTIONAL {?opera wdt:P407 ?language}
OPTIONAL {?opera wdt:P87 ?librettist}
OPTIONAL {?opera wdt:P953 ?fullWork}
?enwiki schema:about ?opera;
schema:isPartOf <https://en.wikipedia.org/>.
OPTIONAL {?opera wdt:P825 ?dedicatedTo}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}