query-3641508277a10357d33bf847a10c2b31

rq turtle/ttl

another property should be used SELECT * { ?item wdt:P31 wd:Q3241045 . ?item wdt:P361+ wd:Q81068910 .
?item p:P1561 ?_survivors . OPTIONAL { ?_survivors ps:P1561 ?number_survivors } }

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
# another property should be used
SELECT *
{
    ?item wdt:P31 wd:Q3241045 . 
    ?item wdt:P361+ wd:Q81068910 .   
    ?item p:P1561 ?_survivors .
    OPTIONAL { ?_survivors ps:P1561 ?number_survivors } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?_survivors"):::projected v1("?item"):::projected v3("?number_survivors"):::projected c2(["wd:Q3241045"]):::iri c4(["wd:Q81068910"]):::iri v1 --"p:direct/P31"--> c2 v1 --"p:direct/P361"--> c4 v1 --"p:P1561"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:statement/P1561".-> v3 end