query-d56c19952a9e8b22c065b11468ee3e97
Propertieslanguage of work or name (P407)OCLC control number (P243)Internet Archive ID (P724)Wikisource index page URL (P1957)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?wdItemLabel ?wdItem ?wcItem ?languageLabel ?iaContent ?wikicommonsContent
WHERE {
?wdItem
wdt:P407 ?language;
?contentProperty ?o;
rdfs:label ?wdItemLabel.
OPTIONAL {?wdItem wdt:P243 ?ocn}
OPTIONAL {?wdItem wdt:P724 ?ia}
OPTIONAL {?wdItem wdt:P1957 ?wikicommonsContent}
BIND (URI(CONCAT("http://www.worldcat.org/oclc/", ?ocn)) AS ?wcItem)
BIND (URI(CONCAT("https://archive.org/details/", ?ia)) AS ?iaContent)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .}
FILTER (?contentProperty=wdt:P1957 || ?contentProperty=wdt:P724)
}
ORDER BY ?wdItemLabel
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?contentProperty")
v7("?ia")
v10("?iaContent"):::projected
v4("?language")
v5("?o")
v6("?ocn")
v9("?wcItem"):::projected
v3("?wdItem"):::projected
v1("?wdItemLabel"):::projected
v8("?wikicommonsContent"):::projected
c7(["bd:serviceParam"]):::iri
c9(["en"]):::literal
f0[["(?contentProperty = 'wdt:P1957' || ?contentProperty = 'wdt:P724')"]]
f0 --> v2
v3 --"wdt:P407"--> v4
v3 -->v2--> v5
v3 --"rdfs:label"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P243".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P724".-> v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P1957".-> v8
end
bind1[/"concat('http://www.worldcat.org/oclc/',?ocn)"/]
v6 --o bind1
bind1 --as--o v9
bind2[/"concat('https://archive.org/details/',?ia)"/]
v7 --o bind2
bind2 --as--o v10
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end