query-dda61cf0a28edda0ceda79e9df2d36d6
productions of Pride and Prejudice and who played Elizabeth Bennet and what kind of thing they were SELECT ?production ?productionLabel ?actress ?actressLabel (group_concat(?instanceofLabel ;separator=", ") as ?typeofproduction)
WHERE {
?production wdt:P144 wd:Q170583 ; # thing based on Pride & Prejudice p:P161 [ ps:P161 ?actress; pq:P453 wd:Q2223341 ] . # cast member has character role elizabeth bennet ?production wdt:P31 ?instanceof
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?instanceof rdfs:label ?instanceofLabel . # i don't know what this bit does except that it's needed
?production rdfs:label ?productionLabel .
?actress rdfs:label ?actressLabel .
}
}
group by ?production ?productionLabel ?actress ?actressLabel
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#productions of Pride and Prejudice and who played Elizabeth Bennet and what kind of thing they were
SELECT ?production ?productionLabel ?actress ?actressLabel (group_concat(?instanceofLabel ;separator=", ") as ?typeofproduction)
WHERE {
?production wdt:P144 wd:Q170583 ; # thing based on Pride & Prejudice
p:P161 [ ps:P161 ?actress; pq:P453 wd:Q2223341 ] . # cast member has character role elizabeth bennet
?production wdt:P31 ?instanceof
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?instanceof rdfs:label ?instanceofLabel . # i don't know what this bit does except that it's needed
?production rdfs:label ?productionLabel .
?actress rdfs:label ?actressLabel .
}
}
group by ?production ?productionLabel ?actress ?actressLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?actress"):::projected
v6("?actressLabel"):::projected
v3("?instanceof")
v4("?instanceofLabel"):::projected
v1("?production"):::projected
v5("?productionLabel"):::projected
v7("?typeofproduction")
a1((" "))
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q170583"]):::iri
c5(["wd:Q2223341"]):::iri
v1 --"p:direct/P144"--> c2
a1 --"p:statement/P161"--> v2
a1 --"p:qualifier/P453"--> c5
v1 --"p:P161"--> a1
v1 --"p:direct/P31"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
v3 --"rdfs:label"--> v4
v1 --"rdfs:label"--> v5
v2 --"rdfs:label"--> v6
end
bind1[/"?instanceofLabel"/]
v4 --o bind1
bind1 --as--o v7