query-5ddec12a2f012bb22aea9dbc25fe2a3e

rq turtle/ttl

Libraries for which we lack an official website

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?library ?libraryLabel ?countryLabel WHERE {
?library wdt:P31/wdt:P279* wd:Q7075. # library (or subtype)
MINUS {?library wdt:P576 []} # Remove defunct
MINUS {?library wdt:P31/wdt:P279* wd:Q212805} # Remove digital libraries
MINUS {?library wdt:P856 []} # No official URL
OPTIONAL {?library wdt:P17 ?country}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?countryLabel ?libraryLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?country") v1("?countryLabel"):::projected v3("?library"):::projected v2("?libraryLabel"):::projected a2((" ")) a4((" ")) a1((" ")) a3((" ")) c3(["wd:Q7075"]):::iri c9(["bd:serviceParam"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q212805"]):::iri v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P576"--> a2 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P31"--> a3 a3 --"wdt:P279"--> c5 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P856"--> a4 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P17".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end