query-eca7e811a46ec25d8a39068f35c41f08
donne italiane con VIAF, BNF ma senza SBN SELECT DISTINCT ?q ?qLabel ?ydob ?ydod ?desc ?viaf WHERE { ?q wdt:P31 wd:Q5; wdt:P214 ?viaf; wdt:P268 ?id; wdt:P27 wd:Q38; wdt:P21 wd:Q6581072. OPTIONAL { ?q wdt:P569 ?dob. } OPTIONAL { ?q wdt:P570 ?dod. } OPTIONAL { ?q schema:description ?desc. } FILTER((LANG(?desc)) = "[AUTO_LANGUAGE]") BIND(YEAR(?dob) AS ?ydob) BIND(YEAR(?dod) AS ?ydod) MINUS { ?q wdt:P396 ?sbn. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY (?desc)
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# donne italiane con VIAF, BNF ma senza SBN
SELECT DISTINCT ?q ?qLabel ?ydob ?ydod ?desc ?viaf WHERE {
?q wdt:P31 wd:Q5;
wdt:P214 ?viaf;
wdt:P268 ?id;
wdt:P27 wd:Q38;
wdt:P21 wd:Q6581072.
OPTIONAL { ?q wdt:P569 ?dob. }
OPTIONAL { ?q wdt:P570 ?dod. }
OPTIONAL { ?q schema:description ?desc. }
FILTER((LANG(?desc)) = "[AUTO_LANGUAGE]")
BIND(YEAR(?dob) AS ?ydob)
BIND(YEAR(?dod) AS ?ydod)
MINUS { ?q wdt:P396 ?sbn. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY (?desc)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?desc"):::projected
v5("?dob")
v6("?dod")
v4("?id")
v2("?q"):::projected
v9("?sbn")
v3("?viaf"):::projected
v7("?ydob"):::projected
v8("?ydod"):::projected
c9(["wd:Q6581072"]):::iri
c7(["wd:Q38"]):::iri
c15(["bd:serviceParam"]):::iri
c3(["wd:Q5"]):::iri
c17(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?desc = '#91;AUTO_LANGUAGE#93;'"]]
f0 --> v1
v2 --"wdt:P31"--> c3
v2 --"wdt:P214"--> v3
v2 --"wdt:P268"--> v4
v2 --"wdt:P27"--> c7
v2 --"wdt:P21"--> c9
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P569".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P570".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."schema:description".-> v1
end
bind1[/"year-from-dateTime(?dob)"/]
v5 --o bind1
bind1 --as--o v7
bind2[/"year-from-dateTime(?dod)"/]
v6 --o bind2
bind2 --as--o v8
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P396"--> v9
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end