query-b2264fc3c769cbe9a3d62d8f0470fa07

rq turtle/ttl

Venezuelan people 19:01, 4 January 2018 (UTC)) talk (Jamez42Hi! I'm still learning how to use the Query Service and my computer is currently very slow. I'm working on creating lists in the Spanish Wikipedia about years in Venezuela, so I wanted to search Venezuelan persons that were either born or have died in the following years: 1833, 1834, 1838, 1839, 1841, 1843, 1844, 1845, 1846, 1847, 1849, 1850, 1851, 1852, 1853, 1855, 1856, 1857, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1874, 1876, 1877, 1878, 1879, 1880 and 1882. Many thanks in advance! --

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 ?y ?item ?itemLabel ?itemDescription ?dob ?dod 
{
    ?item wdt:P27 wd:Q717 .
    { ?item wdt:P569 ?d . BIND(YEAR(?d) as ?y) }
    UNION
    { ?item wdt:P570 ?d . BIND(YEAR(?d) as ?y) }
    FILTER ( ?y IN ( 1833, 1834, 1838, 1839, 1841, 1843, 1844, 1845, 1846, 1847, 1849, 1850, 1851, 1852, 1853, 1855, 1856, 1857, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1874, 1876, 1877, 1878, 1879, 1880, 1882 ) )
    ?item wdt:P31 wd:Q5 . 
    OPTIONAL { ?item wdt:P569 ?dob }
    OPTIONAL { ?item wdt:P570 ?dod }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es,en". }
}      
ORDER BY ?y ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?d") v5("?dob"):::projected v6("?dod"):::projected v3("?item"):::projected v2("?itemLabel"):::projected v5("?y"):::projected c41(["bd:serviceParam"]):::iri c39(["wd:Q5"]):::iri c43(["#91;AUTO_LANGUAGE#93;,es,en"]):::literal c35(["wd:Q717"]):::iri list0c32(["1880^^xsd:integer"]):::literal list0c1(["1833^^xsd:integer"]):::literal list0c16(["1855^^xsd:integer"]):::literal list0c29(["1877^^xsd:integer"]):::literal list0c28(["1876^^xsd:integer"]):::literal list0c15(["1853^^xsd:integer"]):::literal list0c14(["1852^^xsd:integer"]):::literal list0c27(["1874^^xsd:integer"]):::literal list0c13(["1851^^xsd:integer"]):::literal list0c12(["1850^^xsd:integer"]):::literal list0c26(["1872^^xsd:integer"]):::literal list0c25(["1871^^xsd:integer"]):::literal list0c24(["1870^^xsd:integer"]):::literal list0c4(["1839^^xsd:integer"]):::literal list0c3(["1838^^xsd:integer"]):::literal list0c18(["1857^^xsd:integer"]):::literal list0c31(["1879^^xsd:integer"]):::literal list0c2(["1834^^xsd:integer"]):::literal list0c17(["1856^^xsd:integer"]):::literal list0c30(["1878^^xsd:integer"]):::literal list0c7(["1844^^xsd:integer"]):::literal list0c20(["1866^^xsd:integer"]):::literal list0c6(["1843^^xsd:integer"]):::literal list0c19(["1865^^xsd:integer"]):::literal list0c5(["1841^^xsd:integer"]):::literal list0c33(["1882^^xsd:integer"]):::literal list0c11(["1849^^xsd:integer"]):::literal list0c10(["1847^^xsd:integer"]):::literal list0c23(["1869^^xsd:integer"]):::literal list0c9(["1846^^xsd:integer"]):::literal list0c22(["1868^^xsd:integer"]):::literal list0c8(["1845^^xsd:integer"]):::literal list0c21(["1867^^xsd:integer"]):::literal list0c1 --o f0 list0c2 --o f0 list0c3 --o f0 list0c4 --o f0 list0c5 --o f0 list0c6 --o f0 list0c7 --o f0 list0c8 --o f0 list0c9 --o f0 list0c10 --o f0 list0c11 --o f0 list0c12 --o f0 list0c13 --o f0 list0c14 --o f0 list0c15 --o f0 list0c16 --o f0 list0c17 --o f0 list0c18 --o f0 list0c19 --o f0 list0c20 --o f0 list0c21 --o f0 list0c22 --o f0 list0c23 --o f0 list0c24 --o f0 list0c25 --o f0 list0c26 --o f0 list0c27 --o f0 list0c28 --o f0 list0c29 --o f0 list0c30 --o f0 list0c31 --o f0 list0c32 --o f0 list0c33 --o f0 f0[[" in "]] f0 --> v5 v3 --"wdt:P27"--> c35 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P570"--> v4 bind1[/"year-from-dateTime(?d)"/] v4 --o bind1 bind1 --as--o v5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P569"--> v4 bind2[/"year-from-dateTime(?d)"/] v4 --o bind2 bind2 --as--o v5 end union0r <== or ==> union0l end v3 --"wdt:P31"--> c39 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P569".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P570".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c41 --"wikibase:language"--> c43 end