query-1b02f2df2f338cb19d9ac132e4139a23
Bulgarian authors in the public domain in Plovdiv
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX schema: <http://schema.org/>
SELECT ?item ?statements (COUNT(DISTINCT ?sitelink) AS ?wmprojects) ?itemLabel ?genderLabel (GROUP_CONCAT(DISTINCT ?occupationLabel; SEPARATOR = ", ") AS ?occupations) ?death WHERE {
VALUES (?occupation) {
(wd:Q482980)
(wd:Q36180)
(wd:Q6625963)
(wd:Q49757)
(wd:Q11774202)
(wd:Q214917)
(wd:Q753110)
(wd:Q488205)
(wd:Q4964182)
(wd:Q18939491)
(wd:Q1028181)
(wd:Q28389)
(wd:Q1930187)
(wd:Q201788)
(wd:Q3658608)
}
?item wdt:P31 wd:Q5.
{ ?item wdt:P19 wd:Q459. }
UNION
{
?item wdt:P19 ?pob.
?pob wdt:P131* wd:Q459.
}
UNION
{ ?item wdt:P103 wd:Q7918. }
UNION
{ ?item wdt:P1412 wd:Q7918. }
?item wdt:P21 ?gender.
?item wdt:P106 ?occupation.
?item wdt:P570 ?death.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?item rdfs:label ?itemLabel.
?gender rdfs:label ?genderLabel.
?occupation rdfs:label ?occupationLabel.
}
OPTIONAL {
?sitelink schema:about ?item.
?sitelink schema:inLanguage ?lang.
}
BIND(xsd:integer(STRAFTER(STR(?item), "Q")) AS ?qid)
?item wikibase:statements ?statements.
FILTER((YEAR(?death)) < 1959)
}
GROUP BY ?item ?statements ?itemLabel ?genderLabel ?death
ORDER BY DESC(?death)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?death"):::projected
v5("?gender")
v7("?genderLabel"):::projected
v3("?item"):::projected
v6("?itemLabel"):::projected
v10("?lang")
v2("?occupation")
v8("?occupationLabel"):::projected
v14("?occupations")
v4("?pob")
v11("?qid")
v9("?sitelink"):::projected
v12("?statements"):::projected
v13("?wmprojects")
c8(["wd:Q7918"]):::iri
c14(["bd:serviceParam"]):::iri
c5(["wd:Q459"]):::iri
c3(["wd:Q5"]):::iri
c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["year-from-dateTime(?death) < '1959^^xsd:integer'"]]
f0 --> v1
bind1[/VALUES ?occupation/]
bind1-->v2
bind10(["wd:Q482980"])
bind10 --> bind1
bind11(["wd:Q36180"])
bind11 --> bind1
bind12(["wd:Q6625963"])
bind12 --> bind1
bind13(["wd:Q49757"])
bind13 --> bind1
bind14(["wd:Q11774202"])
bind14 --> bind1
bind15(["wd:Q214917"])
bind15 --> bind1
bind16(["wd:Q753110"])
bind16 --> bind1
bind17(["wd:Q488205"])
bind17 --> bind1
bind18(["wd:Q4964182"])
bind18 --> bind1
bind19(["wd:Q18939491"])
bind19 --> bind1
bind110(["wd:Q1028181"])
bind110 --> bind1
bind111(["wd:Q28389"])
bind111 --> bind1
bind112(["wd:Q1930187"])
bind112 --> bind1
bind113(["wd:Q201788"])
bind113 --> bind1
bind114(["wd:Q3658608"])
bind114 --> bind1
v3 --"wdt:P31"--> c3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P1412"--> c8
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P103"--> c8
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P19"--> v4
v4 --"wdt:P131"--> c5
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P19"--> c5
end
union0r <== or ==> union0l
end
v3 --"wdt:P21"--> v5
v3 --"wdt:P106"--> v2
v3 --"wdt:P570"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c14 --"wikibase:language"--> c16
v3 --"rdfs:label"--> v6
v5 --"rdfs:label"--> v7
v2 --"rdfs:label"--> v8
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v9 -."schema:about".-> v3
v9 --"schema:inLanguage"--> v10
end
bind2[/"http://www.w3.org/2001/XMLSchema#integer(substring-after(str(?item),'Q'))"/]
v3 --o bind2
bind2 --as--o v11
v3 --"wikibase:statements"--> v12
bind5[/"count(?sitelink)"/]
v9 --o bind5
bind5 --as--o v13
bind6[/"?occupationLabel"/]
v8 --o bind6
bind6 --as--o v14