query-0447d28427e5e1e4fb97a0e3b40ec278
Female Swedish writers of the 20th century, who were born in StockholmHow to write a query for it. I have started, but something is not working well. Švédské spisovatelky 20. století narozené ve Stockholmu
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 DISTINCT ?item ?itemLabel ?itemDescription ?gender ?genderLabel ?pob ?pobLabel
WHERE
{
?item wdt:P19 / wdt:P276* / wdt:P131* wd:Q1754.
?item wdt:P106 wd:Q36180.
?item wdt:P27 wd:Q34.
VALUES ?gender { wd:Q6581072 }.
?item wdt:P21 ?gender .
{ ?item wdt:P570 ?dod . FILTER( YEAR(?dod) > 1900 ) }
UNION { ?item wdt:P569 ?dob . FILTER( YEAR(?dob) > 1900 && YEAR(?dob) < 2001 ) }
?item wdt:P31 wd:Q5 .
?item wdt:P19 ?pob .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],sv,en". }
}
LIMIT 1000
Query found at
- https://www.wikidata.org/wiki/User:Juandev/Queries
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2019/08
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?dob")
v3("?dod")
v2("?gender"):::projected
v1("?item"):::projected
v5("?pob"):::projected
a1((" "))
a2((" "))
c4(["wd:Q1754"]):::iri
c19(["#91;AUTO_LANGUAGE#93;,sv,en"]):::literal
c8(["wd:Q34"]):::iri
c6(["wd:Q36180"]):::iri
c17(["bd:serviceParam"]):::iri
c15(["wd:Q5"]):::iri
v1 --"wdt:P19"--> a1
a1 --"wdt:P276"--> a2
a2 --"wdt:P131"--> c4
v1 --"wdt:P106"--> c6
v1 --"wdt:P27"--> c8
bind0[/VALUES ?gender/]
bind0-->v2
bind00(["wd:Q6581072"])
bind00 --> bind0
v1 --"wdt:P21"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
f1[["year-from-dateTime(?dob) > '1900^^xsd:integer'year-from-dateTime(?dob) < '2001^^xsd:integer'"]]
f1 --> v4
v1 --"wdt:P569"--> v4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f2[["year-from-dateTime(?dod) > '1900^^xsd:integer'"]]
f2 --> v3
v1 --"wdt:P570"--> v3
end
union0r <== or ==> union0l
end
v1 --"wdt:P31"--> c15
v1 --"wdt:P19"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c17 --"wikibase:language"--> c19
end