query-766c2ad051233095860eed2f09b9e3a7

rq turtle/ttl

Magyar diplomaták beszélt nyelvei

Use at

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 ?country ?countryLabel ?count WHERE { 
    {
        select ?country (COUNT(*) AS ?count) where {
            ?item wdt:P106 wd:Q193391 . 
            { ?item wdt:P27 wd:Q28. }  UNION  { ?item wdt:P27 wd:Q171150. }  UNION  { ?item wdt:P27 wd:Q655621. }
            ?item wdt:P1412 ?country .
        } group by ?country 
    }
    SERVICE wikibase:label {            # ... include the labels
        bd:serviceParam wikibase:language "hu" .
    }
} ORDER BY DESC (?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?count"):::projected v3("?country"):::projected v2("?item") c4(["wd:Q28"]):::iri c2(["wd:Q193391"]):::iri c5(["wd:Q171150"]):::iri c6(["wd:Q655621"]):::iri c9(["bd:serviceParam"]):::iri c11(["hu"]):::literal v2 --"wdt:P106"--> c2 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; v2 --"wdt:P27"--> c6 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P27"--> c5 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P27"--> c4 end union0r <== or ==> union0l end v2 --"wdt:P1412"--> v3 bind1[/"count(*)"/] bind1 --as--o v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end