query-ace730c57aadc59b296310887b97f418

rq turtle/ttl

Propertiesinstance of (P31)sex or gender (P21)country of citizenship (P27)occupation (P106)field of work (P101)date of birth (P569)date of death (P570)family name (P734)given name (P735)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?firstnameLabel ?lastnameLabel ?itemDescription ?nationalityLabel ?occupationLabel ?birthdate ?deathdate WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl,fr,de,en,es,it". }
  ?item wdt:P31 wd:Q5, ?instance;
    wdt:P21 wd:Q6581072, ?gender;
    wdt:P27 wd:Q31, ?nationality;
    wdt:P106 ?occupation.
  FILTER(!(EXISTS { ?item wdt:P101 ?domain. }))
  OPTIONAL { ?item wdt:P569 ?birthdate. }
  OPTIONAL { ?item wdt:P570 ?deathdate. }
  OPTIONAL { ?item wdt:P734 ?lastname. }
  OPTIONAL { ?item wdt:P735 ?firstname. }
}
ORDER BY (?itemLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?birthdate"):::projected v9("?deathdate"):::projected v3("?domain") v11("?firstname") v5("?gender") v4("?instance") v2("?item"):::projected v1("?itemLabel"):::projected v10("?lastname") v6("?nationality") v7("?occupation") c11(["wd:Q31"]):::iri c9(["wd:Q6581072"]):::iri c3(["bd:serviceParam"]):::iri c7(["wd:Q5"]):::iri c5(["#91;AUTO_LANGUAGE#93;,nl,fr,de,en,es,it"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P101"--> e0v2 e0v2("?domain"):::projected e0v1("?item"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 v2 --"wdt:P101"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c3 --"wikibase:language"--> c5 end v2 --"wdt:P31"--> c7 v2 --"wdt:P31"--> v4 v2 --"wdt:P21"--> c9 v2 --"wdt:P21"--> v5 v2 --"wdt:P27"--> c11 v2 --"wdt:P27"--> v6 v2 --"wdt:P106"--> v7 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P569".-> v8 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P570".-> v9 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P734".-> v10 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P735".-> v11 end