query-3517393a3134fe080b6559b331c2d096

rq turtle/ttl

Propertiesemployer (P108)sex or gender (P21)ethnic group (P172)country of citizenship (P27)religion or worldview (P140)sexual orientation (P91)developer (P178)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT
  ?person ?personLabel ?sexorgender (GROUP_CONCAT(DISTINCT ?ethnicityLabel;SEPARATOR=', ') AS ?ethnicity) 
  (GROUP_CONCAT(DISTINCT ?citizenshipLabel;SEPARATOR=', ') AS ?citizenship) ?religion 
  ?sexuality ?developed
WHERE
{
  ?person wdt:P108 wd:Q213439 .
  ?person rdfs:label ?personLabel . FILTER(LANG(?personLabel)='en')
  OPTIONAL { ?person wdt:P21 ?value .
           ?value rdfs:label ?sexorgender . FILTER(LANG(?sexorgender)='en') }
  OPTIONAL { ?person wdt:P172 ?ethnicity .
           ?ethnicity rdfs:label ?ethnicityLabel . FILTER(LANG(?ethnicityLabel)='en') }
  OPTIONAL { ?person wdt:P27 ?citizenship .
           ?citizenship rdfs:label ?citizenshipLabel . FILTER(LANG(?citizenshipLabel)='en') }
  OPTIONAL { ?person wdt:P140 ?value2 .
           ?value2 rdfs:label ?religion . FILTER(LANG(?religion)='en') }
  OPTIONAL { ?person wdt:P91 ?value3 .
           ?value3 rdfs:label ?sexuality . FILTER(LANG(?sexuality)='en') }
  OPTIONAL { ?person wdt:P178+ ?value4 .
           ?value4 rdfs:label ?developed . FILTER(LANG(?developed)='en') }
}
GROUP BY ?person ?personLabel ?sexorgender ?religion ?sexuality ?developed

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v15("?citizenship") v4("?citizenshipLabel"):::projected v1("?developed"):::projected v15("?ethnicity") v5("?ethnicityLabel"):::projected v8("?person"):::projected v6("?personLabel"):::projected v3("?religion"):::projected v7("?sexorgender"):::projected v2("?sexuality"):::projected v9("?value") v12("?value2") v13("?value3") v14("?value4") c3(["wd:Q213439"]):::iri f0[["?personLabel = 'en'"]] f0 --> v6 v8 --"wdt:P108"--> c3 v8 --"rdfs:label"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P21".-> v9 v9 --"rdfs:label"--> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P172".-> v15 v15 --"rdfs:label"--> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P27".-> v15 v15 --"rdfs:label"--> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P140".-> v12 v12 --"rdfs:label"--> v3 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P91".-> v13 v13 --"rdfs:label"--> v2 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P178".-> v14 v14 --"rdfs:label"--> v1 end bind3[/"?ethnicityLabel"/] v5 --o bind3 bind3 --as--o v15 bind4[/"?citizenshipLabel"/] v4 --o bind4 bind4 --as--o v15