query-980e5e7246dfd8f2d5ca520aa45f6e32
title: Some coins in the Khalili Collections SELECT DISTINCT ?obj ?objLabel ?typeLabel ?image ?pubdate ?pubdatePrecision ?url WHERE { ?obj wdt:P195/wdt:P361 wd:Q63160499; wdt:P31 ?type. # Subclass of currency or instance of coin_type {?type wdt:P279?/wdt:P279 wd:Q8142} UNION {?type wdt:P279?/wdt:P31 wd:Q113813711 } ?obj wdt:P18 ?image; wdt:P973 ?url. ?obj p:P571/psv:P571 ?pubdateStatementNode. ?pubdateStatementNode wikibase:timeValue ?pubdate; wikibase:timePrecision ?pubdatePrecision # get precision of the creation date SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } }
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Some coins in the Khalili Collections
SELECT DISTINCT ?obj ?objLabel ?typeLabel ?image ?pubdate ?pubdatePrecision ?url WHERE {
?obj wdt:P195/wdt:P361 wd:Q63160499; wdt:P31 ?type.
# Subclass of currency or instance of coin_type
{?type wdt:P279?/wdt:P279 wd:Q8142} UNION {?type wdt:P279?/wdt:P31 wd:Q113813711 }
?obj wdt:P18 ?image; wdt:P973 ?url.
?obj p:P571/psv:P571 ?pubdateStatementNode.
?pubdateStatementNode wikibase:timeValue ?pubdate;
wikibase:timePrecision ?pubdatePrecision # get precision of the creation date
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?image"):::projected
v1("?obj"):::projected
v6("?pubdate"):::projected
v7("?pubdatePrecision"):::projected
v5("?pubdateStatementNode")
v2("?type")
v4("?url"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c7(["wd:Q113813711"]):::iri
c15(["bd:serviceParam"]):::iri
c6(["wd:Q8142"]):::iri
c3(["wd:Q63160499"]):::iri
c17(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P195"--> a1
a1 --"p:direct/P361"--> c3
v1 --"p:direct/P31"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P279"--> a3
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
end
union1r <== or ==> union1l
end
a3 --"p:direct/P31"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:direct/P279"--> a2
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
end
union2r <== or ==> union2l
end
a2 --"p:direct/P279"--> c6
end
union0r <== or ==> union0l
end
v1 --"p:direct/P18"--> v3
v1 --"p:direct/P973"--> v4
v1 --"p:P571"--> a4
a4 --"p:statement/value/P571"--> v5
v5 --"wikibase:timeValue"--> v6
v5 --"wikibase:timePrecision"--> v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end