query-fab9e56c8de7d66e5a5d32a9bded9477

rq turtle/ttl

Search for missing descriptions in a target language and match with description string SELECT DISTINCT ?item ?itemLabel ?itemDescription ?datePrix ?itemPrenomLabel ?itemNomLabel ?itemGenreLabel ?itemNaissanceLabel ?cityPopulation ?itemDateNaissance ?prixLabel WHERE { ?item wdt:P31 wd:Q5. # instance of human OPTIONAL {?item wdt:P735 ?itemPrenom.} OPTIONAL {?item wdt:P734 ?itemNom.} OPTIONAL {?item wdt:P21 ?itemGenre.} ?item wdt:P19 ?itemNaissance.

?itemNaissance wdt:P1082 ?population .

# Now select the population value of the ?city # (wdt: properties use only statements of "preferred" rank if any, usually meaning "current population") ?itemNaissance p:P1082 ?populationStatement . ?populationStatement ps:P1082 ?cityPopulation. ?populationStatement pq:P585 ?date FILTER NOT EXISTS { ?itemNaissance p:P1082/pq:P585 ?date_ . FILTER (?date_ > ?date) }

OPTIONAL {?item wdt:P569 ?itemDateNaissance.}

?item p:P166 ?award_statement . ?award_statement ps:P166 ?prix . ?prix wdt:P361 wd:Q3405853 . OPTIONAL {?award_statement pq:P585 ?datePrix.} OPTIONAL {?award_statement prov:wasDerivedFrom ?ref}

SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }

}

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Search for missing descriptions in a target language and match with description string
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?datePrix ?itemPrenomLabel ?itemNomLabel ?itemGenreLabel ?itemNaissanceLabel ?cityPopulation ?itemDateNaissance ?prixLabel WHERE {
  ?item wdt:P31 wd:Q5.  # instance of human
  OPTIONAL {?item wdt:P735 ?itemPrenom.}
  OPTIONAL {?item wdt:P734 ?itemNom.}
  OPTIONAL {?item wdt:P21 ?itemGenre.}
  ?item wdt:P19 ?itemNaissance.
#  ?itemNaissance wdt:P1082 ?population .


  # Now select the population value of the ?city
 # (wdt: properties use only statements of "preferred" rank if any, usually meaning "current population")
   ?itemNaissance p:P1082 ?populationStatement .
   ?populationStatement ps:P1082 ?cityPopulation.
   ?populationStatement pq:P585 ?date
   FILTER NOT EXISTS { ?itemNaissance p:P1082/pq:P585 ?date_ . FILTER (?date_ > ?date) } 

  OPTIONAL {?item wdt:P569 ?itemDateNaissance.}

  ?item p:P166 ?award_statement .
  ?award_statement ps:P166 ?prix .
  ?prix wdt:P361 wd:Q3405853 . 
  OPTIONAL {?award_statement pq:P585 ?datePrix.} 
  OPTIONAL {?award_statement prov:wasDerivedFrom ?ref}


 SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }

}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?award_statement") v9("?cityPopulation"):::projected v2("?date") v13("?datePrix"):::projected v1("?date_") v4("?item"):::projected v10("?itemDateNaissance"):::projected v7("?itemGenre") v3("?itemNaissance") v6("?itemNom") v5("?itemPrenom") v8("?populationStatement") v12("?prix") v14("?ref") a1((" ")) c14(["wd:Q3405853"]):::iri c19(["fr"]):::literal c17(["bd:serviceParam"]):::iri c4(["wd:Q5"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?date_ > ?date"]] e0f0 --> e0v1 e0f0 --> e0v2 e0v3 --"p:P1082"--> e0a1 e0a1 --"p:qualifier/P585"--> e0v1 e0v2("?date"):::projected e0v1("?date_"):::projected e0v3("?itemNaissance"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> v2 f0 --> v3 f0 --> c1 f0 --> a1 f0 --> c2 f1[["?date_ > ?date"]] f1 --> v1 f1 --> v2 v3 --"p:P1082"--> a1 a1 --"p:qualifier/P585"--> v1 v4 --"p:direct/P31"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P735".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P734".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P21".-> v7 end v4 --"p:direct/P19"--> v3 v3 --"p:P1082"--> v8 v8 --"p:statement/P1082"--> v9 v8 --"p:qualifier/P585"--> v2 subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:direct/P569".-> v10 end v4 --"p:P166"--> v11 v11 --"p:statement/P166"--> v12 v12 --"p:direct/P361"--> c14 subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v11 -."p:qualifier/P585".-> v13 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v11 -."prov:wasDerivedFrom".-> v14 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c17 --"wikibase:language"--> c19 end