query-af5c9dcba4038d75f7d574739858d365
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?sitelink_de ?sitelink_en ?ATP_Kennung ?sites where
{ {
SELECT ?item ?ATP_Kennung (GROUP_CONCAT(?sitey;SEPARATOR=' ') AS ?sites) where {
OPTIONAL { ?item wdt:P536 ?ATP_Kennung. }
?site schema:about ?item .
BIND(STRAFTER(STRBEFORE(STR(?site),'.org'),'//') AS ?sitex)
BIND(STRBEFORE(?sitex,'.') AS ?sitey)
} GROUP BY ?item ?ATP_Kennung } optional {?sitelink_en ^schema:name ?article_en .
?article_en schema:about ?item ;
schema:isPartOf <https://en.wikipedia.org/> .}
optional {?sitelink_de ^schema:name ?article_de .
?article_de schema:about ?item ;
schema:isPartOf <https://de.wikipedia.org/> .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en,[AUTO_LANGUAGE]". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?ATP_Kennung"):::projected
v9("?article_de")
v7("?article_en")
v1("?item"):::projected
v3("?site")
v10("?sitelink_de"):::projected
v8("?sitelink_en"):::projected
v6("?sites"):::projected
v4("?sitex")
v5("?sitey")
c6([https://de.wikipedia.org/]):::iri
c5([https://en.wikipedia.org/]):::iri
c8(["bd:serviceParam"]):::iri
c10(["de,en,#91;AUTO_LANGUAGE#93;"]):::literal
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P536".-> v2
end
v3 --"schema:about"--> v1
bind0[/"substring-after(substring-before(str(?site),'.org'),'//')"/]
v3 --o bind0
bind0 --as--o v4
bind1[/"substring-before(?sitex,'.')"/]
v4 --o bind1
bind1 --as--o v5
bind3[/"?sitey"/]
v5 --o bind3
bind3 --as--o v6
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v7 -."schema:name".-> v8
v7 --"schema:about"--> v1
v7 --"schema:isPartOf"--> c5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v9 -."schema:name".-> v10
v9 --"schema:about"--> v1
v9 --"schema:isPartOf"--> c6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end