query-c45467d4b5dcef5ff874dafd5604f5f9

rq turtle/ttl

Propertiesinstance of (P31)country of citizenship (P27)sex or gender (P21)occupation (P106)field of work (P101)position held (P39)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription ?sexLabel ?beroepLabel ?domainLabel ?ambtLabel WHERE {
  ?item wdt:P31 wd:Q5.          # instance of human
  ?item wdt:P27 wd:Q31.         # country of citizenship Belgium
 optional{ ?item wdt:P21 ?sex.}
 optional{ ?item wdt:P106 ?beroep.}
 optional{ ?item wdt:P101 ?domain.}
 optional{ ?item wdt:P39 ?ambt.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "nl,en,fr,de,it,es,pt,no". }
  FILTER(NOT EXISTS {
    ?item schema:description ?itemdesc.
    FILTER(LANG(?itemdesc) = "nl")      # missing description
  })
 }
 order by ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?ambt") v5("?beroep") v6("?domain") v3("?item"):::projected v1("?itemLabel"):::projected v2("?itemdesc") v4("?sex") c14(["nl,en,fr,de,it,es,pt,no"]):::literal c6(["wd:Q31"]):::iri c12(["bd:serviceParam"]):::iri c4(["wd:Q5"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?itemdesc = 'nl'"]] e0f0 --> e0v1 e0v2 --"schema:description"--> e0v1 e0v2("?item"):::projected e0v1("?itemdesc"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> v3 f0 --> c2 f1[["?itemdesc = 'nl'"]] f1 --> v2 v3 --"schema:description"--> v2 v3 --"wdt:P31"--> c4 v3 --"wdt:P27"--> c6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P21".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P106".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P101".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P39".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end