query-f22c0fd7d665b41de3df246136a35394

rq turtle/ttl

Most 'wikilar' living Indians citizens without an image

Wikilar as per sitelinks

SELECT ?item ?itemLabel ?itemDescription (COUNT(?sitelink) AS ?sitelinks) ?twitter WHERE { ?item wdt:P27 wd:Q668 . # item is a citizen of India MINUS { ?item wdt:P18 [] }. # without an image linked at Wikidata MINUS { ?item wdt:P570 [] } . # without date of death statement ?sitelink schema:about ?item . OPTIONAL {?item wdt:P2002 ?twitter .} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } } GROUP BY ?itemLabel ?itemDescription ?twitter ?item HAVING(?sitelinks >= 10) #sitelink count to focus on the “most wikilar” people ORDER BY DESC(?sitelinks)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Most 'wikilar' living Indians citizens without an image 
# Wikilar as per sitelinks
SELECT ?item ?itemLabel ?itemDescription (COUNT(?sitelink) AS ?sitelinks) ?twitter
WHERE {
  ?item wdt:P27 wd:Q668 . # item is a citizen of India 
  MINUS { ?item wdt:P18 [] }. # without an image linked at Wikidata
  MINUS { ?item wdt:P570 [] } . # without date of death statement
  ?sitelink schema:about ?item .
    OPTIONAL {?item wdt:P2002 ?twitter .} 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} 
GROUP BY ?itemLabel ?itemDescription ?twitter ?item HAVING(?sitelinks >= 10) #sitelink count to focus on the “most wikilar” people
ORDER BY DESC(?sitelinks)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v3("?sitelink"):::projected v5("?sitelinks") v4("?twitter"):::projected a1((" ")) a2((" ")) c9(["bd:serviceParam"]):::iri c3(["wd:Q668"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?sitelinks >= '10^^xsd:integer'"]] f0 --> v5 v2 --"wdt:P27"--> c3 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P18"--> a1 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P570"--> a2 end v3 --"schema:about"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P2002".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind4[/"count(?sitelink)"/] v3 --o bind4 bind4 --as--o v5