query-beea194b898b574eb40052f558b11c66
Lithuanian citizens by occupation
Use at
- https://query.wikidata.org/sparql
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#>
#title:Lithuanian citizens by occupation
#defaultView:BubbleChart
SELECT ?cid ?cause (count(*) as ?count)
WHERE
{
?pid wdt:P31 wd:Q5 .
?pid wdt:P27 wd:Q37 .
?pid wdt:P106 ?cid .
OPTIONAL {
?cid rdfs:label ?cause
filter (lang(?cause) = "lt")
}
}
GROUP BY ?cid ?cause
ORDER BY DESC(?count) ASC(?cause)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?cause"):::projected
v4("?cid"):::projected
v5("?count")
v3("?pid")
c3(["wd:Q5"]):::iri
c5(["wd:Q37"]):::iri
v3 --"wdt:P31"--> c3
v3 --"wdt:P27"--> c5
v3 --"wdt:P106"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v2
end
bind1[/"count(*)"/]
bind1 --as--o v5