query-75770cd658ae046d7edf1790eb2e6e51
Getting urls with identifier properties I use this query. one of my tools For
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?image ?creator ?institution ?invnum ?location ?url WHERE {
?item wdt:P31/wdt:P279* wd:Q3305213 .
OPTIONAL { ?item wdt:P18 ?image } .
OPTIONAL { ?item wdt:P170 ?creator } .
OPTIONAL { ?item wdt:P195 ?institution } .
OPTIONAL { ?item wdt:P217 ?invnum } .
OPTIONAL { ?item wdt:P276 ?location } .
OPTIONAL { ?item wdt:P973 ?url } .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?creator"):::projected
v2("?image"):::projected
v4("?institution"):::projected
v5("?invnum"):::projected
v1("?item"):::projected
v6("?location"):::projected
v7("?url"):::projected
a1((" "))
c3(["wd:Q3305213"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P170".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P195".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P217".-> v5
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P276".-> v6
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P973".-> v7
end