query-bbcfd7bda6554be9ee4c9558d3dd9c3c
National heroes of Indonesia and their birthdates SELECT ?itemID ?labelEN ?labelID ?birthdate WHERE { ?itemID wdt:P166 wd:Q1369309 . # items with award received National Hero of Indonesia OPTIONAL { ?itemID wdt:P569 ?birthdate } # birthdate information OPTIONAL { ?itemID rdfs:label ?labelEN . # English label FILTER(LANG(?labelEN)="en") } OPTIONAL { ?itemID rdfs:label ?labelID . # Indonesian label FILTER(LANG(?labelID)="id") } }
Use at
- https://query.wikidata.org/sparql
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#>
# National heroes of Indonesia and their birthdates
SELECT ?itemID ?labelEN ?labelID ?birthdate
WHERE {
?itemID wdt:P166 wd:Q1369309 . # items with award received National Hero of Indonesia
OPTIONAL { ?itemID wdt:P569 ?birthdate } # birthdate information
OPTIONAL { ?itemID rdfs:label ?labelEN . # English label
FILTER(LANG(?labelEN)="en") }
OPTIONAL { ?itemID rdfs:label ?labelID . # Indonesian label
FILTER(LANG(?labelID)="id") }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?birthdate"):::projected
v3("?itemID"):::projected
v2("?labelEN"):::projected
v1("?labelID"):::projected
c4(["wd:Q1369309"]):::iri
v3 --"wdt:P166"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P569".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."rdfs:label".-> v1
end