query-797550b8f1ba3c8f73f27c1001b57584

rq turtle/ttl

title: Archive in de,fr,us,gb SELECT DISTINCT ?page_title ?article (GROUP_CONCAT(DISTINCT ?class; SEPARATOR = ", ") AS ?ist_ein) (GROUP_CONCAT(DISTINCT ?sitz; SEPARATOR = ", ") AS ?sitze) ?land ?website ?item WHERE { ?item (wdt:P31/(wdt:P279*)) wd:Q166118; wdt:P17 ?country; wdt:P31 ?klasse; wikibase:sitelinks ?sl. FILTER((?sl > 0 ) && (?country IN(wd:Q183, wd:Q30, wd:Q145, wd:Q142))) OPTIONAL { ?dearticle schema:about ?item; schema:isPartOf https://de.wikipedia.org/; schema:name ?depage_title. } OPTIONAL { ?enarticle schema:about ?item; schema:isPartOf https://en.wikipedia.org/; schema:name ?enpage_title. } OPTIONAL { ?item wdt:P131 ?ve. } OPTIONAL { ?item (wdt:P131/wdt:P131) ?vve. } OPTIONAL { ?item wdt:P856 ?website. } BIND(IF(BOUND(?dearticle), ?dearticle, ?enarticle) AS ?article) BIND(IF(BOUND(?depage_title), ?depage_title, ?enpage_title) AS ?page_title) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr,en". ?ve rdfs:label ?sitz. ?country rdfs:label ?land. ?klasse rdfs:label ?class. } } GROUP BY ?page_title ?article ?land ?website ?item ORDER BY (?land) (?sitze) (?page_title)

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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Archive in de,fr,us,gb
SELECT DISTINCT ?page_title ?article (GROUP_CONCAT(DISTINCT ?class; SEPARATOR = ", ") AS ?ist_ein) (GROUP_CONCAT(DISTINCT ?sitz; SEPARATOR = ", ") AS ?sitze) ?land ?website ?item WHERE {
  ?item (wdt:P31/(wdt:P279*)) wd:Q166118;
    wdt:P17 ?country;
    wdt:P31 ?klasse;
    wikibase:sitelinks ?sl.
  FILTER((?sl > 0 ) && (?country IN(wd:Q183, wd:Q30, wd:Q145, wd:Q142)))
  OPTIONAL {
    ?dearticle schema:about ?item;
      schema:isPartOf <https://de.wikipedia.org/>;
      schema:name ?depage_title.
  }
  OPTIONAL {
    ?enarticle schema:about ?item;
      schema:isPartOf <https://en.wikipedia.org/>;
      schema:name ?enpage_title.
  }
  OPTIONAL { ?item wdt:P131 ?ve. }
  OPTIONAL { ?item (wdt:P131/wdt:P131) ?vve. }
  OPTIONAL { ?item wdt:P856 ?website. }
  BIND(IF(BOUND(?dearticle), ?dearticle, ?enarticle) AS ?article)
  BIND(IF(BOUND(?depage_title), ?depage_title, ?enpage_title) AS ?page_title)
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr,en".
    ?ve rdfs:label ?sitz.
    ?country rdfs:label ?land.
    ?klasse rdfs:label ?class.
  }
}
GROUP BY ?page_title ?article ?land ?website ?item
ORDER BY (?land) (?sitze) (?page_title)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v15("?article"):::projected v17("?class"):::projected v5("?country") v8("?dearticle") v9("?depage_title") v10("?enarticle") v11("?enpage_title") v18("?ist_ein") v6("?item"):::projected v7("?klasse") v1("?land"):::projected v16("?page_title"):::projected v16("?sitz"):::projected v19("?sitze") v4("?sl") v12("?ve") v13("?vve") v14("?website"):::projected a1((" ")) a2((" ")) c13([https://de.wikipedia.org/]):::iri c21(["#91;AUTO_LANGUAGE#93;,fr,en"]):::literal c15([https://en.wikipedia.org/]):::iri c8(["wd:Q166118"]):::iri c19(["bd:serviceParam"]):::iri list0c2(["wd:Q30"]):::iri list0c1(["wd:Q183"]):::iri list0c3(["wd:Q145"]):::iri list0c4(["wd:Q142"]):::iri list0c1 --o f0 list0c2 --o f0 list0c3 --o f0 list0c4 --o f0 f0[["?sl > '0^^xsd:integer' in "]] f0 --> v4 f0 --> v5 v6 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c8 v6 --"wdt:P17"--> v5 v6 --"wdt:P31"--> v7 v6 --"wikibase:sitelinks"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v8 -."schema:about".-> v6 v8 --"schema:isPartOf"--> c13 v8 --"schema:name"--> v9 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v10 -."schema:about".-> v6 v10 --"schema:isPartOf"--> c15 v10 --"schema:name"--> v11 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P131".-> v12 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P131".-> a2 a2 --"wdt:P131"--> v13 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P856".-> v14 end bind1[/"if(bound(?dearticle),?dearticle,?enarticle)"/] v8 --o bind1 v10 --o bind1 bind1 --as--o v15 bind2[/"if(bound(?depage_title),?depage_title,?enpage_title)"/] v9 --o bind2 v11 --o bind2 bind2 --as--o v16 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c19 --"wikibase:language"--> c21 v12 --"rdfs:label"--> v16 v5 --"rdfs:label"--> v1 v7 --"rdfs:label"--> v17 end bind5[/"?class"/] v17 --o bind5 bind5 --as--o v18 bind6[/"?sitz"/] v16 --o bind6 bind6 --as--o v19