query-b0cb54db9234e18f972d612920b98e17

rq turtle/ttl

Item with the name "Madonna and Child" in EnglishHi, I would like a query that lists all items that have the label "Madonna and Child" in English and no label in French, in order to add a label in French with QuickStatements. 07:05, 7 May 2017 (UTC)) 🙋 (TubezlobThank you, Almost the same as in above section: TREE[33506][][31] and CLAIM[17:145] fr:Catégorie:Village du Sénégal

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel {
  BIND( STRLANG( "Madonna and Child", "en" ) AS ?enlabel ) .
  ?item rdfs:label ?enlabel .
 FILTER NOT EXISTS {
    ?item rdfs:label ?frlabel .
    FILTER( LANG( ?frlabel ) = "fr" ) .
  } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" } .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?enlabel") v1("?frlabel") v2("?item"):::projected c4(["bd:serviceParam"]):::iri c6(["fr,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?frlabel = 'fr'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v1("?frlabel"):::projected e0v2("?item"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> c2 f1[["?frlabel = 'fr'"]] f1 --> v1 v2 --"rdfs:label"--> v1 bind2[/"STRLANG('Madonna and Child','en')"/] bind2 --as--o v3 v2 --"rdfs:label"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end