query-69aadc4158b1adb63957e92c363449ed
List of people with generic function "ambassador" and qualifiers SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q5 ; p:P39 ?fonction . ?fonction ps:P39 wd:Q121998 . {?fonction pq:P156 ?p156.} UNION {?fonction pq:P155 ?p155.} UNION {?fonction pq:P580 ?p580.} UNION {?fonction pq:P582 ?p582.} UNION {?fonction pq:P1365 ?p1365.} UNION {?fonction pq:P1366 ?p1366.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en".
?item rdfs:label ?itemLabel .}
} GROUP BY ?item ?itemLabel
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#>
# List of people with generic function "ambassador" and qualifiers
SELECT ?item ?itemLabel
WHERE
{
?item wdt:P31 wd:Q5 ;
p:P39 ?fonction .
?fonction ps:P39 wd:Q121998 .
{?fonction pq:P156 ?p156.}
UNION {?fonction pq:P155 ?p155.}
UNION {?fonction pq:P580 ?p580.}
UNION {?fonction pq:P582 ?p582.}
UNION {?fonction pq:P1365 ?p1365.}
UNION {?fonction pq:P1366 ?p1366.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en".
?item rdfs:label ?itemLabel .}
}
GROUP BY ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?fonction")
v1("?item"):::projected
v9("?itemLabel"):::projected
v7("?p1365")
v8("?p1366")
v4("?p155")
v3("?p156")
v5("?p580")
v6("?p582")
c13(["bd:serviceParam"]):::iri
c5(["wd:Q121998"]):::iri
c2(["wd:Q5"]):::iri
c15(["fr,en"]):::literal
v1 --"p:direct/P31"--> c2
v1 --"p:P39"--> v2
v2 --"p:statement/P39"--> c5
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:qualifier/P1366"--> v8
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:qualifier/P1365"--> v7
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:qualifier/P582"--> v6
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:qualifier/P580"--> v5
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:qualifier/P155"--> v4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:qualifier/P156"--> v3
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
v1 --"rdfs:label"--> v9
end