query-4bce4462b79387ce1564506fa49122eb

rq turtle/ttl

Egy évszázad utónevei

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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:P27 wd:Q28} UNION {?item wdt:P27 wd:Q171150}  UNION {?item wdt:P27 wd:Q655621} . 
            ?item wdt:P31 wd:Q5;
    wdt:P569 ?birth.
            ?item wdt:P735 ?country .
  FILTER((?birth >= "1800-01-01"^^xsd:dat) && (?birth < "1900-01-01"^^xsd:dat))          
        } 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; v2("?birth") v5("?count"):::projected v4("?country"):::projected v3("?item") c5(["wd:Q171150"]):::iri c14(["hu"]):::literal c4(["wd:Q28"]):::iri c6(["wd:Q655621"]):::iri c12(["bd:serviceParam"]):::iri c8(["wd:Q5"]):::iri f0[["?birth >= s1800-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'?birth < s1900-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f0 --> v2 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; v3 --"wdt:P27"--> c6 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P27"--> c5 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P27"--> c4 end union0r <== or ==> union0l end v3 --"wdt:P31"--> c8 v3 --"wdt:P569"--> v2 v3 --"wdt:P735"--> v4 bind2[/"count(*)"/] bind2 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end