query-c8eb2b107977acab06b60a58d906b0a9
The following query uses these:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?child ?childLabel ?p1 ?p2
WHERE
{
# variant 0: functional; note "prop/direct"
# ?child <http://www.wikidata.org/prop/direct/P22> <http://www.wikidata.org/entity/Q1339>.
# ?child <http://www.wikidata.org/prop/direct/P25> <http://www.wikidata.org/entity/Q57487>.
# variant 00: functional; note 2 kinds of "prop"
# ?child <http://www.wikidata.org/prop/P22>/<http://www.wikidata.org/prop/statement/P22> <http://www.wikidata.org/entity/Q1339>.
# ?child <http://www.wikidata.org/prop/P25>/<http://www.wikidata.org/prop/statement/P25> <http://www.wikidata.org/entity/Q57487>
# wikibase:directClaim - https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Properties
# variant 1: functional, additional patterns, note "entity"
# <http://www.wikidata.org/entity/P22> wikibase:directClaim ?p1 .
# <http://www.wikidata.org/entity/P25> wikibase:directClaim ?p2 .
# ?child ?p1 <http://www.wikidata.org/entity/Q1339>.
# ?child ?p2 <http://www.wikidata.org/entity/Q57487>.
# variant 2: functional, property paths, note "entity"
BIND(<http://www.wikidata.org/entity/P22>/wikibase:directClaim as ?p1)
BIND(<http://www.wikidata.org/entity/P25>/wikibase:directClaim as ?p2)
?child ?p1 <http://www.wikidata.org/entity/Q1339>.
?child ?p2 <http://www.wikidata.org/entity/Q57487>.
# variant 3: not, note "entity"
# ?child <http://www.wikidata.org/entity/P22>/wikibase:directClaim <http://www.wikidata.org/entity/Q1339>.
# ?child <http://www.wikidata.org/entity/P25>/wikibase:directClaim <http://www.wikidata.org/entity/Q57487>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?child"):::projected
v1("?p1"):::projected
v2("?p2"):::projected
c1([http://www.wikidata.org/entity/Q1339]):::iri
c4(["bd:serviceParam"]):::iri
c2([http://www.wikidata.org/entity/Q57487]):::iri
c6(["en"]):::literal
bind0[/"http://www.wikidata.org/entity/P22 / 'wikibase:directClaim'"/]
bind0 --as--o v1
bind1[/"http://www.wikidata.org/entity/P25 / 'wikibase:directClaim'"/]
bind1 --as--o v2
v3 -->v1--> c1
v3 -->v2--> c2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end