query-c46d0a901abc24064cd38bb396cda67a

rq turtle/ttl

people whose birth place is Odisha, 876 items @19FEB2019 SELECT ?item ?statements ?linkcount ?itemLabel ?pic ?birth ?pobLabel ?VIAF ?IMDb WHERE { ?item wdt:P31 wd:Q5 . # humans only ?item wdt:P19 / wdt:P131* wd:Q1033 # place of birth is within Nigeria. OPTIONAL { ?item wdt:P569 ?birth } OPTIONAL { ?item wdt:P19 ?pob }
OPTIONAL { ?item wdt:P18 ?pic } OPTIONAL { ?item wdt:P214 ?VIAF }
OPTIONAL { ?item wdt:P345 ?IMDb } OPTIONAL { ?item wikibase:sitelinks ?linkcount. } #count sitelinks ?item wikibase:statements ?statements . # for counting statements SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } # for generating label } GROUP BY ?item ?statements ?linkcount ?itemLabel ?pic ?birth ?pobLabel ?VIAF ?IMDb ORDER BY DESC(?linkcount)

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#>
# people whose birth place is Odisha, 876 items @19FEB2019
SELECT ?item ?statements ?linkcount ?itemLabel ?pic ?birth ?pobLabel ?VIAF ?IMDb
WHERE {
    ?item wdt:P31 wd:Q5 .       # humans only
     ?item wdt:P19 / wdt:P131* wd:Q1033   # place of birth is within Nigeria.
    OPTIONAL { ?item wdt:P569 ?birth  }
    OPTIONAL { ?item wdt:P19 ?pob  }    
    OPTIONAL { ?item wdt:P18 ?pic }
    OPTIONAL { ?item wdt:P214 ?VIAF  }  
    OPTIONAL { ?item wdt:P345 ?IMDb  }
    OPTIONAL { ?item wikibase:sitelinks ?linkcount. }  #count sitelinks
 ?item wikibase:statements ?statements . # for counting statements
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } # for generating label
  }
GROUP BY ?item ?statements ?linkcount ?itemLabel ?pic ?birth ?pobLabel ?VIAF ?IMDb
ORDER BY DESC(?linkcount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?IMDb"):::projected v6("?VIAF"):::projected v3("?birth"):::projected v2("?item"):::projected v1("?linkcount"):::projected v5("?pic"):::projected v4("?pob") v8("?statements"):::projected a1((" ")) c13(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal c5(["wd:Q1033"]):::iri v2 --"wdt:P31"--> c2 v2 --"wdt:P19"--> a1 a1 --"wdt:P131"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P569".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P19".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P18".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P214".-> v6 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P345".-> v7 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v2 -."wikibase:sitelinks".-> v1 end v2 --"wikibase:statements"--> v8 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end