query-3720e149a5c1907da4d7ae462aa6da31
Three Decks list for the Royal Navy SELECT DISTINCT ?person ?personLabel ?givenLabel ?familyLabel ?threeID { # human instead of fictional ?person wdt:P31 wd:Q5 .
# person in Royal Navy ?person wdt:P241 wd:Q172771 .
# person has a Three Decks identifier ?person wdt:P7389 ?threeID .
OPTIONAL { # given name ?person wdt:P735 ?given . }
OPTIONAL { # family name ?person wdt:P734 ?family . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?threeID
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 bd: <http://www.bigdata.com/rdf#>
# Three Decks list for the Royal Navy
SELECT DISTINCT ?person ?personLabel ?givenLabel ?familyLabel ?threeID
{
# human instead of fictional
?person wdt:P31 wd:Q5 .
# person in Royal Navy
?person wdt:P241 wd:Q172771 .
# person has a Three Decks identifier
?person wdt:P7389 ?threeID .
OPTIONAL {
# given name
?person wdt:P735 ?given .
}
OPTIONAL {
# family name
?person wdt:P734 ?family .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .} .
} ORDER BY ?threeID
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?family")
v3("?given")
v2("?person"):::projected
v1("?threeID"):::projected
c9(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c11(["en"]):::literal
c4(["wd:Q172771"]):::iri
v2 --"wdt:P31"--> c2
v2 --"wdt:P241"--> c4
v2 --"wdt:P7389"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P735".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P734".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end