query-b1db8d7735f4ee315260270eeceefcd8

rq turtle/ttl


Personen mit Bezug zu Dresden, ohne Tätigkeit

---------------------------------------------------------------------------------------

SELECT distinct ?item ?itemLabel ?firstnameLabel ?lastnameLabel ?itemDescription ?image WHERE { {?item wdt:P19 wd:Q1731} # Person mit Geburtsort = Dresden union {?item wdt:P20 wd:Q1731} # Person mit Todesort = Dresden union {?item wdt:P937 wd:Q1731} # Person mit Wirkungsort = Dresden
union {?item wdt:P108 wd:Q158158} # Personen die an der TU angestellt sind/waren

?item wdt:P31 wd:Q5 . # Only humans FILTER NOT EXISTS { ?item wdt:P106 [] } . # Person ohne Tätigkeit filter exists {?item schema:description ?desc . filter(lang(?desc)="de") } # Beschreibung auf Deutsch ist leer

OPTIONAL { ?item wdt:P734 ?lastname . }                      # Nachname
OPTIONAL { ?item wdt:P735 ?firstname . }                     # Vorname
OPTIONAL { ?item wdt:P18 ?image . }                          # optional Bild
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]"}

} order by ?itemDescription

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#>
#---------------------------------------------------------------------------------------
# Personen mit Bezug zu Dresden, ohne Tätigkeit
#---------------------------------------------------------------------------------------
SELECT distinct ?item ?itemLabel ?firstnameLabel ?lastnameLabel ?itemDescription ?image 
WHERE
{
    {?item wdt:P19 wd:Q1731}               # Person mit Geburtsort = Dresden
    union
    {?item wdt:P20 wd:Q1731}               # Person mit Todesort = Dresden
    union
    {?item wdt:P937 wd:Q1731}              # Person mit Wirkungsort = Dresden  
    union
    {?item wdt:P108 wd:Q158158}            # Personen die an der TU angestellt sind/waren

  ?item wdt:P31 wd:Q5 .                         # Only humans
  FILTER NOT EXISTS { ?item wdt:P106 [] } .     # Person ohne Tätigkeit
  filter exists {?item schema:description ?desc . filter(lang(?desc)="de") } # Beschreibung auf Deutsch ist leer 

    OPTIONAL { ?item wdt:P734 ?lastname . }                      # Nachname
    OPTIONAL { ?item wdt:P735 ?firstname . }                     # Vorname
    OPTIONAL { ?item wdt:P18 ?image . }                          # optional Bild
    SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]"}
} 
order by ?itemDescription

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?desc") v5("?firstname") v6("?image"):::projected v3("?item"):::projected v1("?itemDescription"):::projected v4("?lastname") a1((" ")) c16(["bd:serviceParam"]):::iri c11(["wd:Q5"]):::iri c5(["wd:Q1731"]):::iri c18(["de,en,#91;AUTO_LANGUAGE#93;"]):::literal c9(["wd:Q158158"]):::iri f0[[" "]] subgraph f0e0["Exists Clause"] e0f0[["?desc = 'de'"]] e0f0 --> e0v1 e0v2 --"schema:description"--> e0v1 e0v1("?desc"):::projected e0v2("?item"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> v3 f0 --> c2 f1[["?desc = 'de'"]] f1 --> v2 v3 --"schema:description"--> v2 f2[["not "]] subgraph f2e1["Exists Clause"] e1v1 --"wdt:P106"--> e1a1 e1v1("?item"):::projected e1a1((" ")):::projected end f2--EXISTS--> f2e1 f2 --> v3 f2 --> c3 f2 --> a1 v3 --"wdt:P106"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P108"--> c9 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P937"--> c5 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P20"--> c5 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P19"--> c5 end union0r <== or ==> union0l end v3 --"wdt:P31"--> c11 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P734".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P735".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c16 --"wikibase:language"--> c18 end