query-834ce90a5c708f7bc3ada5c118b5c93d

rq turtle/ttl

Punjabi women (birth/ language) without an article in Punjabi Wikipedia SELECT ?item ?statements ?linkcount ?itemLabel ?itemDescription?birth ?pobLabel ?death ?podLabel WHERE { ?item wdt:P31 wd:Q5 . # item is a human ?item wdt:P21 wd:Q6581072 . # gender is female { ?item wdt:P19 wd:Q22424 } # place of birth is Punjab (Q22424) UNION { ?item wdt:P19 ?pob . ?pob wdt:P131* wd:Q22424 } # place of birth within Punjab. UNION {?item wdt:P103|wdt:P1412 wd:Q58635 } # native/ spoken/ written/ signed = Punjabi language = Punjabi

OPTIONAL { ?item wdt:P569 ?birth } OPTIONAL { ?item wdt:P19 ?pob } OPTIONAL { ?item wdt:P570 ?death } OPTIONAL { ?item wdt:P20 ?pod }

OPTIONAL { ?sitelink schema:about ?item . ?sitelink schema:inLanguage "pa" } # look for articles (sitelinks) in Punjabi ("pa") FILTER (!BOUND(?sitelink)) # but select items with no such article OPTIONAL {?item wikibase:sitelinks ?linkcount. } OPTIONAL { ?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 ?itemDescription?birth ?pobLabel ?death ?podLabel ORDER BY DESC(?linkcount) #Sorted by amount of articles in other languages.

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#>
#Punjabi women (birth/ language) without an article in Punjabi Wikipedia
SELECT ?item ?statements ?linkcount ?itemLabel ?itemDescription?birth ?pobLabel ?death ?podLabel
WHERE {
  ?item wdt:P31 wd:Q5 .         # item is a human
  ?item wdt:P21 wd:Q6581072 .   # gender is female
  { ?item wdt:P19 wd:Q22424 }   # place of birth is Punjab (Q22424) 
     UNION  { ?item wdt:P19 ?pob . 
              ?pob wdt:P131* wd:Q22424 } # place of birth within Punjab. 
     UNION {?item wdt:P103|wdt:P1412 wd:Q58635 } # native/ spoken/ written/ signed = Punjabi language = Punjabi

OPTIONAL { ?item wdt:P569 ?birth  }
OPTIONAL { ?item wdt:P19 ?pob  }
OPTIONAL { ?item wdt:P570 ?death  }
OPTIONAL { ?item wdt:P20 ?pod  }  

 OPTIONAL { ?sitelink schema:about ?item . 
          ?sitelink schema:inLanguage "pa" }    # look for articles (sitelinks) in Punjabi ("pa") 
 FILTER (!BOUND(?sitelink))    # but select items with no such article
 OPTIONAL  {?item wikibase:sitelinks ?linkcount. }
 OPTIONAL { ?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 ?itemDescription?birth ?pobLabel ?death ?podLabel
ORDER BY DESC(?linkcount)  #Sorted by amount of articles in other languages.

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?birth"):::projected v6("?death"):::projected v3("?item"):::projected v1("?linkcount"):::projected v4("?pob") v7("?pod") v2("?sitelink") v8("?statements"):::projected c4(["wd:Q6581072"]):::iri c6(["wd:Q22424"]):::iri c16(["pa"]):::literal c20(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c9(["wd:Q58635"]):::iri c22(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not bound(?sitelink)"]] f0 --> v2 v3 --"wdt:P31"--> c2 v3 --"wdt:P21"--> c4 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; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P1412"--> c9 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P103"--> c9 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P19"--> v4 v4 --"wdt:P131"--> c6 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P19"--> c6 end union0r <== or ==> union0l end 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:P19".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P570".-> v6 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P20".-> v7 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."schema:about".-> v3 v2 --"schema:inLanguage"--> c16 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v3 -."wikibase:sitelinks".-> v1 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v3 -."wikibase:statements".-> v8 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c20 --"wikibase:language"--> c22 end