query-4b66b148a9061c528d4a6b40bb5dd45f
wikibase:reference to identify property used to reference SELECT distinct ?itemLabel ?date ?sourcePropertyLabel ?referenceLabel ?reference WHERE { ?item wdt:P39/wdt:P279 wd:Q1285463. ?item wdt:P569 ?date. OPTIONAL{ ?item p:P569 [ prov:wasDerivedFrom [ ?source ?reference ] ]. ?sourceProperty wikibase:reference ?source. }
?item p:P39 ?decla. ?decla pq:P580 ?ddebut. FILTER NOT EXISTS {?decla pq:P582 ?dfin. } FILTER (?date > "1952-01-01T00:00:00+00:00"^^xsd:dateTime) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr". }.
}
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#wikibase:reference to identify property used to reference
SELECT distinct ?itemLabel ?date ?sourcePropertyLabel ?referenceLabel ?reference
WHERE
{
?item wdt:P39/wdt:P279 wd:Q1285463.
?item wdt:P569 ?date.
OPTIONAL{
?item p:P569 [ prov:wasDerivedFrom [ ?source ?reference ] ].
?sourceProperty wikibase:reference ?source.
}
?item p:P39 ?decla.
?decla pq:P580 ?ddebut.
FILTER NOT EXISTS {?decla pq:P582 ?dfin. }
FILTER (?date > "1952-01-01T00:00:00+00:00"^^xsd:dateTime)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr". }.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?date"):::projected
v8("?ddebut")
v2("?decla")
v3("?dfin")
v4("?item")
v6("?reference"):::projected
v5("?source")
v7("?sourceProperty")
a1((" "))
a3((" "))
a2((" "))
c5(["wd:Q1285463"]):::iri
c13(["bd:serviceParam"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,fr"]):::literal
f0[["?date > '1952-01-01T00:00:00+00:00^^xsd:dateTime'"]]
f0 --> v1
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0v1 --"p:qualifier/P582"--> e0v2
e0v1("?decla"):::projected
e0v2("?dfin"):::projected
end
f1--EXISTS--> f1e0
f1 --> v2
f1 --> c2
f1 --> v3
v2 --"p:qualifier/P582"--> v3
v4 --"p:direct/P39"--> a1
a1 --"p:direct/P279"--> c5
v4 --"p:direct/P569"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a2 -->v5--> v6
a3 -."prov:wasDerivedFrom".-> a2
v4 --"p:P569"--> a3
v7 --"wikibase:reference"--> v5
end
v4 --"p:P39"--> v2
v2 --"p:qualifier/P580"--> v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c13 --"wikibase:language"--> c15
end