query-a82443fd3c60b729476645843edacbf1
Optional reference defined. Is it possible to make that P143 part optional? Can't think of any place, where to put optional. (P143)imported from Wikimedia project ) lists all items which have hereThis query (borrowed from
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?value ?wiki ?wikiLabel {
?item p:P2369 [ ps:P2369 ?value; prov:wasDerivedFrom/pr:P143 ?wiki ] .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
} ORDER BY ?wiki
limit 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v2("?value"):::projected
v1("?wiki"):::projected
a1((" "))
a2((" "))
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
a1 --"p:statement/P2369"--> v2
a1 --"prov:wasDerivedFrom"--> a2
a2 --"p:reference/P143"--> v1
v3 --"p:P2369"--> a1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end