query-b7b77a3ad21136eede65fd756a9caab6
Propertiesnotable work (P800)instance of (P31)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?workTypeLabel ?workType ?executeForSample
WHERE {
?creator wdt:P800 ?notableWork .
?notableWork wdt:P31 ?workType.
?workType rdfs:label ?workTypeLabel.
# SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
FILTER (LANG(?workTypeLabel)='en')
BIND(URI(CONCAT('https://query.wikidata.org/#SELECT%20%3FsLabel%20%3Fs%0AWHERE%20%7B%0A%20%20%3Fs%20wdt%3AP31%20%3C', ENCODE_FOR_URI(STR(?workType)), '%3E%3B%0A%20%20%20%20%20rdfs%3Alabel%20%3FsLabel.%0A%20%20FILTER%20(LANG(%3FsLabel)%3D\'en\')%0A%7D%0AORDER%20BY%20%3FsLabel%0ALIMIT%20100')) AS ?executeForSample)
}
ORDER BY ?workTypeLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?creator")
v5("?executeForSample"):::projected
v3("?notableWork")
v4("?workType"):::projected
v1("?workTypeLabel"):::projected
f0[["?workTypeLabel = 'en'"]]
f0 --> v1
v2 --"wdt:P800"--> v3
v3 --"wdt:P31"--> v4
v4 --"rdfs:label"--> v1
bind1[/"concat('https://query.wikidata.org/#SELECT%20%3FsLabel%20%3Fs%0AWHERE%20%7B%0A%20%20%3Fs%20wdt%3AP31%20%3C',encode-for-uri(str(?workType)),'%3E%3B%0A%20%20%20%20%20rdfs%3Alabel%20%3FsLabel.%0A%20%20FILTER%20(LANG(%3FsLabel)%3D'en')%0A%7D%0AORDER%20BY%20%3FsLabel%0ALIMIT%20100')"/]
v4 --o bind1
bind1 --as--o v5