query-2b5e5c1ab9880f7b3ab95805dbe7bb80
Propertiesauthor (P50)publisher (P123)OCLC control number (P243)
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 ?bookLabel ?book ?authorPublisherLabel ?authorPublisher ?ocnURI
WHERE {
?book wdt:P50 ?authorPublisher;
rdfs:label ?bookLabel;
wdt:P123 ?authorPublisher .
OPTIONAL {
?book wdt:P243 ?ocn
}
BIND(URI(CONCAT('http://www.worldcat.org/oclc/', ?ocn)) AS ?ocnURI)
# ?prop wikibase:directClaim ?p
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?bookLabel
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?authorPublisher"):::projected
v2("?book"):::projected
v1("?bookLabel"):::projected
v4("?ocn")
v5("?ocnURI"):::projected
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
v2 --"wdt:P50"--> v3
v2 --"rdfs:label"--> v1
v2 --"wdt:P123"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P243".-> v4
end
bind0[/"concat('http://www.worldcat.org/oclc/',?ocn)"/]
v4 --o bind0
bind0 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end