query-8e0e02717c1a5d34bf1890317fc17308

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.
  ?item wdt:P27 wd:Q31.
 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,pt,es,no". }
  FILTER(NOT EXISTS {
    ?item schema:description ?itemdesc.
    FILTER(LANG(?itemdesc) = "nl")
  })
  FILTER(EXISTS {
    ?item schema:description ?itemdesc.
    FILTER(LANG(?itemdesc) = "en")
  })
 }
 order by ?itemDescription

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("?itemDescription"):::projected v2("?itemdesc") v4("?sex") c7(["wd:Q31"]):::iri c13(["bd:serviceParam"]):::iri c5(["wd:Q5"]):::iri c15(["nl,en,fr,de,pt,es,no"]):::literal f0[[" "]] subgraph f0e0["Exists Clause"] e0f0[["?itemdesc = 'en'"]] e0f0 --> e0v1 e0v2 --"schema:description"--> e0v1 e0v2("?item"):::projected e0v1("?itemdesc"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> v3 f0 --> c2 f1[["?itemdesc = 'en'"]] f1 --> v2 v3 --"schema:description"--> v2 f2[["not "]] subgraph f2e1["Exists Clause"] e1f0[["?itemdesc = 'nl'"]] e1f0 --> e1v1 e1v2 --"schema:description"--> e1v1 e1v2("?item"):::projected e1v1("?itemdesc"):::projected end f2--EXISTS--> f2e1 f2 --> v2 f2 --> v3 f2 --> c2 f3[["?itemdesc = 'nl'"]] f3 --> v2 v3 --"schema:description"--> v2 v3 --"wdt:P31"--> c5 v3 --"wdt:P27"--> c7 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; c13 --"wikibase:language"--> c15 end