query-27886f0a42e6e9c4bf9f239d8149b0b9
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?property ?propertyLabel ?predicateType ?predicate ?predicateLabel ?value ?valueLabel WHERE
{
VALUES ?item {wd:Q12418}
?item ?predicate ?value . # The item has some predicates & values
?property ?predicateType ?predicate . # gratuitously find out what type the predicate it
{?property wikibase:directClaim ?predicate .} # limit the predicates of interest to directClaims - i.e. wdt:
UNION
{?property wikibase:claim ?predicate .} # and to claims - i.e. p:
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
v2("?predicate"):::projected
v5("?predicateType"):::projected
v4("?property"):::projected
v3("?value"):::projected
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q12418"])
bind00 --> bind0
v1 -->v2--> v3
v4 -->v5--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wikibase:claim"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"wikibase:directClaim"--> v2
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end