query-1e33f4b0e2bdf301fad9dbdfba9572bd

rq turtle/ttl

Pablo(s) Escobar 07:03, 14 July 2019 (UTC)) talk (BouzinacHello, how to make this work (returns only one thing while I wished all the individuals given first name Pablo and last name Escobar), given the fact there exists Pablo Emiliano, Pablo Andrés, Pablo Sidar etc ?

Use at

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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?label ?_pays WHERE {
  ?item wdt:P735 wd:Q2045138.
    ?item wdt:P734 wd:Q16463330.
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "fr" . 
    ?item rdfs:label ?label
  }

OPTIONAL { ?item wdt:P27 ?pays. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?label"):::projected v3("?pays") c6(["bd:serviceParam"]):::iri c2(["wd:Q2045138"]):::iri c4(["wd:Q16463330"]):::iri c8(["fr"]):::literal v1 --"wdt:P735"--> c2 v1 --"wdt:P734"--> c4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 v1 --"rdfs:label"--> v2 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P27".-> v3 end