query-ba7300c815b625e781dd719dd032eb9d
In English, this reads: Child has father Johann Sebastian Bach. Child has mother Maria Barbara Bach. That sounds a bit awkward, doesn’t it? In natural language, we’d abbreviate this: Child has father Johann Sebastian Bach and mother Maria Barbara Bach. ) instead of a period, you can add another predicate-object pair. This allows us to abbreviate the above query to: ;In fact, it’s possible to express the same abbreviation in SPARQL as well: if you end a triple with a semicolon (
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?child ?childLabel
WHERE
{
?child wdt:P22 wd:Q1339;
wdt:P25 wd: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;
v1("?child"):::projected
c2(["wd:Q1339"]):::iri
c6(["bd:serviceParam"]):::iri
c4(["wd:Q57487"]):::iri
c8(["en"]):::literal
v1 --"wdt:P22"--> c2
v1 --"wdt:P25"--> c4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end