query-9490dd852bd6af86a3aa3627e6d702e1
TODO
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?number ?retrieved_as_qualifier ?retrieved_as_ref
WHERE
{
?item wdt:P31 wd:Q24634210 .
?item p:P1113 ?stat .
?stat ps:P1113 ?number .
{?stat pq:P813 ?retrieved_as_qualifier.}
UNION
{?stat prov:wasDerivedFrom/pr:P813 ?retrieved_as_ref.}
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;
v1("?item"):::projected
v3("?number"):::projected
v4("?retrieved_as_qualifier"):::projected
v5("?retrieved_as_ref"):::projected
v2("?stat")
a1((" "))
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2(["wd:Q24634210"]):::iri
v1 --"p:direct/P31"--> c2
v1 --"p:P1113"--> v2
v2 --"p:statement/P1113"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"prov:wasDerivedFrom"--> a1
a1 --"p:reference/P813"--> v5
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:qualifier/P813"--> v4
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end