query-db7488d49d947aae95b8a182d0f21f24
Propertiesinstance of (P31)subclass of (P279)composer (P86)publication date (P577)country of citizenship (P27)place of birth (P19)located in the administrative territorial entity (P131)date of birth (P569)
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?composer ?composerLabel ?countryLabel ?DOB ?age WHERE {
?item (wdt:P31/(wdt:P279*)) wd:Q7889;
wdt:P86 ?composer;
wdt:P577 ?date.
?composer wdt:P27 ?country;
wdt:P27 wd:Q17;
(p:P569/psv:P569) _:b1.
_:b1 wikibase:timePrecision ?precision ;
wikibase:timeValue ?DOB.
FILTER(?precision > 8).
MINUS {
?composer (wdt:P19/(wdt:P131*)) wd:Q1490.
}
BIND((YEAR(?date)) - (YEAR(?DOB)) AS ?age)
FILTER(?age < 25)
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;
v7("?DOB"):::projected
v8("?age"):::projected
v4("?composer"):::projected
v6("?country")
v5("?date")
v3("?item"):::projected
v2("?precision")
a3((" "))
a1((" "))
a2((" "))
a4((" "))
c9(["wd:Q17"]):::iri
c18(["bd:serviceParam"]):::iri
c16(["wd:Q1490"]):::iri
c5(["wd:Q7889"]):::iri
c20(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?age < '25^^xsd:integer'"]]
f0 --> v8
f1[["?precision > '8^^xsd:integer'"]]
f1 --> v2
v3 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c5
v3 --"p:direct/P86"--> v4
v3 --"p:direct/P577"--> v5
v4 --"p:direct/P27"--> v6
v4 --"p:direct/P27"--> c9
v4 --"p:P569"--> a2
a2 --"p:statement/value/P569"--> a3
a3 --"wikibase:timePrecision"--> v2
a3 --"wikibase:timeValue"--> v7
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v4 --"p:direct/P19"--> a4
a4 --"p:direct/P131"--> c16
end
bind3[/"year-from-dateTime(?date) - year-from-dateTime(?DOB)"/]
v5 --o bind3
v7 --o bind3
bind3 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c18 --"wikibase:language"--> c20
end