query-a044711c30fa0602b7df48e523dc08e0
TODO
Use at
- https://query.wikidata.org/sparql
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#>
SELECT ?item ?title ?srwiki ?dewiki (GROUP_CONCAT(DISTINCT ?gsprache; SEPARATOR = ", ") AS ?sprachen) ?LTAid (URI(CONCAT("https://www.librarything.com/author/", ?LTAid)) AS ?LTAurl) WHERE {
{
?item wdt:P7400 ?LTAid;
wdt:P31 ?instanz.
OPTIONAL {
?srwiki schema:about ?item;
schema:isPartOf <https://sr.wikipedia.org/>;
schema:name ?title.
}
OPTIONAL {
?dewiki schema:about ?item;
schema:isPartOf <https://de.wikipedia.org/>;
schema:name ?de_title.
}
OPTIONAL { ?item wdt:P1412 ?sprache. }
FILTER((BOUND(?srwiki)) && (?instanz = wd:Q5))
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?sprache rdfs:label ?gsprache.
}
}
}
GROUP BY ?item ?title ?srwiki ?dewiki ?LTAid
ORDER BY (?title)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?LTAid"):::projected
v11("?LTAurl")
v7("?de_title")
v6("?dewiki"):::projected
v9("?gsprache"):::projected
v3("?instanz")
v4("?item"):::projected
v8("?sprache")
v10("?sprachen")
v2("?srwiki"):::projected
v1("?title"):::projected
c8([https://de.wikipedia.org/]):::iri
c11(["bd:serviceParam"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c6([https://sr.wikipedia.org/]):::iri
f0[["bound(?srwiki)?instanz = 'wd:Q5'"]]
f0 --> v2
f0 --> v3
v4 --"wdt:P7400"--> v5
v4 --"wdt:P31"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."schema:about".-> v4
v2 --"schema:isPartOf"--> c6
v2 --"schema:name"--> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v6 -."schema:about".-> v4
v6 --"schema:isPartOf"--> c8
v6 --"schema:name"--> v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P1412".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
v8 --"rdfs:label"--> v9
end
bind2[/"?gsprache"/]
v9 --o bind2
bind2 --as--o v10
bind3[/"concat('https://www.librarything.com/author/',?LTAid)"/]
v5 --o bind3
bind3 --as--o v11