query-a271eef1a0683913384e24080b2d7d27

rq turtle/ttl

title: Kategorie Künstler(München) inclusive Unterkategorien SELECT DISTINCT ?title ?page_title ?article ?item ?statements (GROUP_CONCAT(DISTINCT ?klasse;separator=", ") as ?art) ?geboren_in ?jahr ?gestorben_in (GROUP_CONCAT(DISTINCT ?wirkortLabel;separator=", ") as ?tätig_in) (GROUP_CONCAT(DISTINCT ?beruf;separator=", ") as ?tätig_als) WHERE { VALUES ?title { "Kategorie: Künstler_(München)" "Kategorie: Architekt_(München)" "Kategorie: Grafiker_(München)" "Kategorie: Intendant_(Bayerisches_Staatsschauspiel)" "Kategorie: Intendant_(Bayerische_Staatsoper)" "Kategorie: Musikdirektor_(Bayerische_Staatsoper)" "Kategorie: Baumeister_(München)" "Kategorie: Bildender_Künstler_(München)" "Kategorie: Hochschullehrer_(Akademie_der_Bildenden_Künste_München)" "Kategorie: Ehrenmitglied_der_Akademie_der_Bildenden_Künste_München" "Kategorie: Hochschullehrer_(Hochschule_für_Musik_und_Theater_München)" "Kategorie: Fotograf_(München)" "Kategorie: Maler_(München)" "Kategorie: Musiker_(München)" "Kategorie: Darstellender_Künstler_(München)" "Kategorie: Generalmusikdirektor_(Bayerische_Staatsoper)" "Kategorie: Bildhauer_(München)" "Kategorie: Komiker_(München)" "Kategorie: Intendant_(Gärtnerplatztheater)" } SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "de.wikipedia.org"; wikibase:api "Generator"; mwapi:generator "categorymembers"; mwapi:gcmtitle ?title; mwapi:gcmprop "ids%7Ctitle%7Ctype"; mwapi:gcmlimit "max". ?member wikibase:apiOutput mwapi:title. ?ns wikibase:apiOutput "@ns". ?item wikibase:apiOutputItem mwapi:item. } FILTER(BOUND(?item) && ?ns = "0") OPTIONAL { ?article schema:about ?item; schema:isPartOf https://de.wikipedia.org/; schema:name ?page_title. }
OPTIONAL { ?item wikibase:statements ?statements. } OPTIONAL { ?item wdt:P19 ?geburtsort. } OPTIONAL { ?item wdt:P569 ?geboren_am. } OPTIONAL { ?item wdt:P20 ?sterbeort. } OPTIONAL { ?item wdt:P937 ?wirkort. } OPTIONAL { ?item wdt:P21 ?gender. } OPTIONAL { ?item wdt:P106 ?occupation. }
OPTIONAL { ?item wdt:P31 ?class. }
FILTER(BOUND(?class)) BIND(IF((?class = wd:Q5),?gender,?class) AS ?cl). BIND(YEAR(?geboren_am) AS ?jahr) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?geburtsort rdfs:label ?geboren_in . ?sterbeort rdfs:label ?gestorben_in . ?wirkort rdfs:label ?wirkortLabel . ?gender rdfs:label ?geschlecht. ?occupation rdfs:label ?beruf. ?cl rdfs:label ?klasse. } } group by ?title ?page_title ?article ?item ?statements ?geboren_in ?jahr ?gestorben_in order by ?title ?page_title

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Kategorie Künstler(München) inclusive Unterkategorien
SELECT DISTINCT ?title ?page_title ?article ?item ?statements (GROUP_CONCAT(DISTINCT ?klasse;separator=", ") as ?art) ?geboren_in ?jahr ?gestorben_in (GROUP_CONCAT(DISTINCT ?wirkortLabel;separator=", ") as ?tätig_in) (GROUP_CONCAT(DISTINCT ?beruf;separator=", ") as ?tätig_als) WHERE {
   VALUES ?title { "Kategorie: Künstler_(München)" 
"Kategorie: Architekt_(München)" 
"Kategorie: Grafiker_(München)" 
"Kategorie: Intendant_(Bayerisches_Staatsschauspiel)" 
"Kategorie: Intendant_(Bayerische_Staatsoper)" 
"Kategorie: Musikdirektor_(Bayerische_Staatsoper)" 
"Kategorie: Baumeister_(München)" 
"Kategorie: Bildender_Künstler_(München)" 
"Kategorie: Hochschullehrer_(Akademie_der_Bildenden_Künste_München)" 
"Kategorie: Ehrenmitglied_der_Akademie_der_Bildenden_Künste_München" 
"Kategorie: Hochschullehrer_(Hochschule_für_Musik_und_Theater_München)" 
"Kategorie: Fotograf_(München)" 
"Kategorie: Maler_(München)" 
"Kategorie: Musiker_(München)" 
"Kategorie: Darstellender_Künstler_(München)" 
"Kategorie: Generalmusikdirektor_(Bayerische_Staatsoper)" 
"Kategorie: Bildhauer_(München)" 
"Kategorie: Komiker_(München)" 
"Kategorie: Intendant_(Gärtnerplatztheater)"  }
    SERVICE wikibase:mwapi {
     bd:serviceParam wikibase:endpoint "de.wikipedia.org";
                     wikibase:api "Generator";
                     mwapi:generator "categorymembers";
                     mwapi:gcmtitle ?title;
                     mwapi:gcmprop "ids%7Ctitle%7Ctype";
                     mwapi:gcmlimit "max".
     ?member wikibase:apiOutput mwapi:title.
     ?ns wikibase:apiOutput "@ns".
     ?item wikibase:apiOutputItem mwapi:item.
  }
  FILTER(BOUND(?item) && ?ns = "0")
  OPTIONAL {   ?article schema:about ?item;
      schema:isPartOf <https://de.wikipedia.org/>;
      schema:name ?page_title.
            }  
OPTIONAL {  ?item wikibase:statements ?statements. }
      OPTIONAL {
    ?item wdt:P19 ?geburtsort.
    }
    OPTIONAL {
    ?item wdt:P569 ?geboren_am.
    }
  OPTIONAL {
    ?item wdt:P20 ?sterbeort.
    }
  OPTIONAL {
    ?item wdt:P937 ?wirkort.
    }
  OPTIONAL {
    ?item wdt:P21 ?gender.
    }
  OPTIONAL {
    ?item wdt:P106 ?occupation.
    }  
  OPTIONAL {
    ?item wdt:P31 ?class.
    }  
  FILTER(BOUND(?class))
  BIND(IF((?class = wd:Q5),?gender,?class) AS ?cl).
  BIND(YEAR(?geboren_am) AS ?jahr)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
            ?geburtsort rdfs:label ?geboren_in .
            ?sterbeort rdfs:label ?gestorben_in .
            ?wirkort rdfs:label ?wirkortLabel .
            ?gender rdfs:label ?geschlecht.
            ?occupation rdfs:label ?beruf.
            ?cl rdfs:label ?klasse.
    }
}
group by ?title ?page_title ?article ?item ?statements ?geboren_in ?jahr ?gestorben_in
order by ?title ?page_title

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v23("?art") v7("?article"):::projected v21("?beruf"):::projected v15("?cl") v3("?class") v10("?geboren_am") v17("?geboren_in"):::projected v9("?geburtsort") v13("?gender") v20("?geschlecht") v18("?gestorben_in"):::projected v4("?item"):::projected v16("?jahr"):::projected v22("?klasse"):::projected v6("?member") v5("?ns") v14("?occupation") v2("?page_title"):::projected v8("?statements"):::projected v11("?sterbeort") v6("?title"):::projected v25("?tätig_als") v24("?tätig_in") v12("?wirkort") v19("?wirkortLabel"):::projected c22([https://de.wikipedia.org/]):::iri c19(["mwapi:item"]):::iri c17(["@ns"]):::literal c3(["bd:serviceParam"]):::iri c12(["ids%7Ctitle%7Ctype"]):::literal c14(["max"]):::literal c9(["categorymembers"]):::literal c5(["de.wikipedia.org"]):::literal c34(["#91;AUTO_LANGUAGE#93;,en"]):::literal c16(["mwapi:title"]):::iri c7(["Generator"]):::literal f0[["bound(?class)"]] f0 --> v3 f1[["bound(?item)?ns = '0'"]] f1 --> v4 f1 --> v5 bind2[/VALUES ?title/] bind2-->v6 bind20(["Kategorie: Künstler_(München)"]) bind20 --> bind2 bind21(["Kategorie: Architekt_(München)"]) bind21 --> bind2 bind22(["Kategorie: Grafiker_(München)"]) bind22 --> bind2 bind23(["Kategorie: Intendant_(Bayerisches_Staatsschauspiel)"]) bind23 --> bind2 bind24(["Kategorie: Intendant_(Bayerische_Staatsoper)"]) bind24 --> bind2 bind25(["Kategorie: Musikdirektor_(Bayerische_Staatsoper)"]) bind25 --> bind2 bind26(["Kategorie: Baumeister_(München)"]) bind26 --> bind2 bind27(["Kategorie: Bildender_Künstler_(München)"]) bind27 --> bind2 bind28(["Kategorie: Hochschullehrer_(Akademie_der_Bildenden_Künste_München)"]) bind28 --> bind2 bind29(["Kategorie: Ehrenmitglied_der_Akademie_der_Bildenden_Künste_München"]) bind29 --> bind2 bind210(["Kategorie: Hochschullehrer_(Hochschule_für_Musik_und_Theater_München)"]) bind210 --> bind2 bind211(["Kategorie: Fotograf_(München)"]) bind211 --> bind2 bind212(["Kategorie: Maler_(München)"]) bind212 --> bind2 bind213(["Kategorie: Musiker_(München)"]) bind213 --> bind2 bind214(["Kategorie: Darstellender_Künstler_(München)"]) bind214 --> bind2 bind215(["Kategorie: Generalmusikdirektor_(Bayerische_Staatsoper)"]) bind215 --> bind2 bind216(["Kategorie: Bildhauer_(München)"]) bind216 --> bind2 bind217(["Kategorie: Komiker_(München)"]) bind217 --> bind2 bind218(["Kategorie: Intendant_(Gärtnerplatztheater)"]) bind218 --> bind2 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:endpoint"--> c5 c3 --"mwapi:api"--> c7 c3 --"mwapi:generator"--> c9 c3 --"mwapi:gcmtitle"--> v6 c3 --"mwapi:gcmprop"--> c12 c3 --"mwapi:gcmlimit"--> c14 v6 --"mwapi:apiOutput"--> c16 v5 --"mwapi:apiOutput"--> c17 v4 --"mwapi:apiOutputItem"--> c19 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v7 -."schema:about".-> v4 v7 --"schema:isPartOf"--> c22 v7 --"schema:name"--> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."mwapi:statements".-> v8 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P19".-> v9 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P569".-> v10 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P20".-> v11 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P937".-> v12 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P21".-> v13 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P106".-> v14 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P31".-> v3 end bind3[/"if(?class = 'wd:Q5',?gender,?class)"/] v3 --o bind3 v13 --o bind3 bind3 --as--o v15 bind4[/"year-from-dateTime(?geboren_am)"/] v10 --o bind4 bind4 --as--o v16 subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c3 --"mwapi:language"--> c34 v9 --"rdfs:label"--> v17 v11 --"rdfs:label"--> v18 v12 --"rdfs:label"--> v19 v13 --"rdfs:label"--> v20 v14 --"rdfs:label"--> v21 v15 --"rdfs:label"--> v22 end bind8[/"?klasse"/] v22 --o bind8 bind8 --as--o v23 bind9[/"?wirkortLabel"/] v19 --o bind9 bind9 --as--o v24 bind10[/"?beruf"/] v21 --o bind10 bind10 --as--o v25