query-b3e4b9687cd5187f12dc008d1f474c30
PropertiesOCLC control number (P243)publication date (P577)language of work or name (P407)translator (P655)
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?workLabel ?work ?workOCNURI ?editionOCNURI ?languageLabel ?language ?year ?translatorLabel ?translator
WHERE {
?work p:P577 ?edition ;
rdfs:label ?workLabel .
?edition pq:P407 ?language ;
ps:P577 ?date .
OPTIONAL { ?work wdt:P243 ?workOCN }
OPTIONAL { ?edition pq:P243 ?editionOCN }
OPTIONAL { ?edition pq:P655 ?translator }
BIND(URI(CONCAT('http://www.worldcat.org/oclc/', ?workOCN)) AS ?workOCNURI)
BIND(URI(CONCAT('http://www.worldcat.org/oclc/', ?editionOCN)) AS ?editionOCNURI)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
BIND(YEAR(?date) AS ?year)
# FILTER (?work=wd:Q2222)
}
ORDER BY ?workLabel ?date
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?date")
v4("?edition")
v7("?editionOCN")
v10("?editionOCNURI"):::projected
v5("?language"):::projected
v8("?translator"):::projected
v3("?work"):::projected
v1("?workLabel"):::projected
v6("?workOCN")
v9("?workOCNURI"):::projected
v11("?year"):::projected
c9(["bd:serviceParam"]):::iri
c11(["en"]):::literal
v3 --"p:P577"--> v4
v3 --"rdfs:label"--> v1
v4 --"p:qualifier/P407"--> v5
v4 --"p:statement/P577"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P243".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P243".-> v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P655".-> v8
end
bind0[/"concat('http://www.worldcat.org/oclc/',?workOCN)"/]
v6 --o bind0
bind0 --as--o v9
bind1[/"concat('http://www.worldcat.org/oclc/',?editionOCN)"/]
v7 --o bind1
bind1 --as--o v10
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind2[/"year-from-dateTime(?date)"/]
v2 --o bind2
bind2 --as--o v11