User:MKar/Query

From Wikidata
Jump to navigation Jump to search

Contents

Odia People[edit]

People whose birth place is Odisha[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, place of birth (P19) View with Reasonator View with SQID, located in the administrative territorial entity (P131) View with Reasonator View with SQID, date of birth (P569) View with Reasonator View with SQID, image (P18) View with Reasonator View with SQID, VIAF ID (P214) View with Reasonator View with SQID, IMDb ID (P345) View with Reasonator View with SQID
     1 # people whose birth place is Odisha, 876 items @19FEB2019
     2 SELECT ?item ?statements ?linkcount ?itemLabel ?pic ?birth ?pobLabel ?VIAF ?IMDb
     3 WHERE {
     4 	?item wdt:P31 wd:Q5 .		# humans only
     5 	 ?item wdt:P19 / wdt:P131* wd:Q22048   # place of birth is within Odisha.
     6 	OPTIONAL { ?item wdt:P569 ?birth  }
     7 	OPTIONAL { ?item wdt:P19 ?pob  }	
     8   	OPTIONAL { ?item wdt:P18 ?pic }
     9   	OPTIONAL { ?item wdt:P214 ?VIAF  }	
    10   	OPTIONAL { ?item wdt:P345 ?IMDb  }
    11   	OPTIONAL { ?item wikibase:sitelinks ?linkcount. }  #count sitelinks
    12  ?item wikibase:statements ?statements . # for counting statements
    13   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }	# for generating label
    14   }
    15 GROUP BY ?item ?statements ?linkcount ?itemLabel ?pic ?birth ?pobLabel ?VIAF ?IMDb
    16 ORDER BY DESC(?linkcount)
    

people whose native language or spoken/written language is Odia[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, native language (P103) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID
     1 SELECT ?item ?itemLabel ?itemDescription (COUNT(distinct ?sitelink) as ?count) 
     2 WHERE {
     3   ?item wdt:P31 wd:Q5. # all humans
     4   {?item wdt:P103 wd:Q33810 }
     5   	UNION {?item wdt:P1412 wd:Q33810 }        
     6   		OPTIONAL { ?sitelink schema:about ?item . ?sitelink schema:inLanguage ?lang } 
     7   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
     8 }
     9 GROUP BY ?item ?itemLabel ?itemDescription 
    10 ORDER BY DESC(?count)
    11 LIMIT 500
    

Odia people (couples- whose spoken/written language is Odia)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID, spouse (P26) View with Reasonator View with SQID
    1 SELECT DISTINCT ?item ?itemLabel ?person2 ?person2Label WHERE {
    2   ?item wdt:P31 wd:Q5. # all humans
    3   ?item wdt:P1412 wd:Q33810.
    4   ?person2 wdt:P31 wd:Q5.
    5   ?person2 wdt:P1412 wd:Q33810.
    6   ?person2 wdt:P26 ?item.
    7   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    8   FILTER((STR(?person2)) > (STR(?item)))
    9 }ORDER BY ASC(?itemLabel)
    

Odia people (parent-child)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, child (P40) View with Reasonator View with SQID, place of birth (P19) View with Reasonator View with SQID, located in the administrative territorial entity (P131) View with Reasonator View with SQID, native language (P103) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID, spouse (P26) View with Reasonator View with SQID
     1 SELECT ?item ?statements ?linkcount ?itemLabel ?spouceLabel 
     2 (GROUP_CONCAT(DISTINCT ?chld_label ;separator=', ') AS ?childs)
     3 WHERE {
     4 	?item wdt:P31 wd:Q5 . 	# item = humans only
     5     ?item wdt:P40 ?chld .
     6 	?chld rdfs:label ?chld_label 
     7           FILTER (lang(?chld_label) = "or") . # to get only Odia labels
     8   { ?item wdt:P19 wd:Q22048 }		# place of birth = Odisha (Q22048) 
     9 	UNION  { ?item wdt:P19 ?pob . ?pob wdt:P131* wd:Q22048 } 	# OR place of birth within Odisha. 
    10 	UNION {?item wdt:P103 wd:Q33810 }		# native language = Odia
    11 	UNION {?item wdt:P1412 wd:Q33810 }      # OR language spoken/ written/ signed = Odia
    12  OPTIONAL { ?item wdt:P26 ?spouce  }
    13  ?item wikibase:statements ?statements . # for counting statements
    14   OPTIONAL { ?item wikibase:sitelinks ?linkcount. }  #count sitelinks
    15   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en".}	# for generating label	
    16 }
    17 GROUP BY ?item ?statements ?linkcount ?itemLabel ?spouceLabel ?chldLabel 
    18 ORDER BY DESC (?linkcount)
    

Odia people died in 2019[edit]

The following query uses these:

  • Properties: date of death (P570) View with Reasonator View with SQID, instance of (P31) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID, date of birth (P569) View with Reasonator View with SQID
     1 # Odia people (whose spoken/written language is Odia) died in 2019
     2 SELECT ?item ?itemLabel ?itemDescription ?dod ?dob ?age
     3 WHERE {
     4   ?item wdt:P570 ?dod .
     5 	FILTER ( ?dod >= "2019-01-01T00:00:00Z"^^xsd:dateTime && ?dod <= "2019-12-31T00:00:00Z"^^xsd:dateTime )
     6   ?item wdt:P31 wd:Q5 .
     7   ?item wdt:P1412 wd:Q33810.
     8   	OPTIONAL { ?item wdt:P569 ?dob . BIND( (2017-YEAR(?dob)+1) as ?age) }
     9   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } 
    10 }
    11 ORDER BY DESC(?age)
    

Odia authors in the public domain in India[edit]

As of 1 January 2019: Works from authors who died before 1959.

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, place of birth (P19) View with Reasonator View with SQID, located in the administrative territorial entity (P131) View with Reasonator View with SQID, native language (P103) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID, occupation (P106) View with Reasonator View with SQID, date of death (P570) View with Reasonator View with SQID
     1 SELECT ?item ?statements ?linkcount ?itemLabel ?genderLabel (GROUP_CONCAT(DISTINCT ?occupationLabel; SEPARATOR = ", ") AS ?occupations) ?death
     2 WHERE {
     3 VALUES ?occupation { wd:Q482980 wd:Q36180 wd:Q6625963 wd:Q49757 wd:Q11774202 wd:Q214917 wd:Q753110 wd:Q488205 wd:Q4964182 wd:Q18939491 wd:Q1028181 wd:Q28389 wd:Q1930187 wd:Q201788 wd:Q3658608 } . #occupation: composer, poet, sculptor, writer, artist, painter
     4   ?item wdt:P31 wd:Q5. # all humans
     5   { ?item wdt:P19 wd:Q22048 }
     6 	UNION  { ?item wdt:P19 ?pob . ?pob wdt:P131* wd:Q22048 } 
     7 	UNION {?item wdt:P103 wd:Q33810 }
     8   	UNION {?item wdt:P1412 wd:Q33810 }        
     9   ?item wdt:P21 ?gender.
    10   ?item wdt:P106 ?occupation.
    11   ?item wdt:P570 ?death.
    12   SERVICE wikibase:label {
    13     bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
    14     ?item rdfs:label ?itemLabel.
    15     ?gender rdfs:label ?genderLabel.
    16     ?occupation rdfs:label ?occupationLabel.
    17   }
    18   FILTER((YEAR(?death)) < 1959)
    19   OPTIONAL { ?item wikibase:sitelinks ?linkcount. }  #count sitelinks 
    20 ?item wikibase:statements ?statements . # for counting statements
    21 }
    22 GROUP BY ?item ?statements ?linkcount ?itemLabel ?genderLabel ?death
    23 ORDER BY DESC(?death)
    

Members of Lok Sabha from Odisha[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, subclass of (P279) View with Reasonator View with SQID, located in the administrative territorial entity (P131) View with Reasonator View with SQID, successful candidate (P991) View with Reasonator View with SQID, point in time (P585) View with Reasonator View with SQID
     1 SELECT ?item ?itemLabel ?desc ?state ?stateLabel ?eyear ?member ?memberLabel 
     2 WHERE {
     3   BIND(wd:Q22048 as ?state) # Odisha
     4   BIND (wd:Q3532431 as ?name)
     5   BIND (wd:Q3429959 as ?constituency)
     6   ?item wdt:P31/wdt:P279* ?constituency. # constituency
     7   ?item p:P131 ?statement . # get state name   
     8   ?item wdt:P131 ?state .    
     9    ?item p:P585 [
    10      	ps:P585 ?eyear ;
    11         pq:P991 ?member;
    12    ].
    13      
    14   #Filter (year(?eyear) = 2014) .
    15   #optional{?item wdt:P991 ?member  .}
    16 
    17   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    18    OPTIONAL {
    19      ?item rdfs:label ?desc filter (lang(?desc) = "en").
    20    }  
    21 }
    

Odia women[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID, place of birth (P19) View with Reasonator View with SQID, located in the administrative territorial entity (P131) View with Reasonator View with SQID, native language (P103) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID, date of birth (P569) View with Reasonator View with SQID, date of death (P570) View with Reasonator View with SQID, place of death (P20) View with Reasonator View with SQID
     1 SELECT ?item ?statements ?linkcount ?itemLabel ?birth ?pobLabel ?death ?podLabel
     2 WHERE {
     3 	?item wdt:P31 wd:Q5 . 	# item = humans only
     4   	?item wdt:P21 wd:Q6581072 .		  # gender = female only
     5 	{ ?item wdt:P19 wd:Q22048 }		# place of birth = Odisha (Q22048) 
     6   UNION  { ?item wdt:P19 ?pob . ?pob wdt:P131* wd:Q22048 } 	# OR place of birth within Odisha. 
     7   UNION {?item wdt:P103 wd:Q33810 }		# native language = Odia
     8   UNION {?item wdt:P1412 wd:Q33810 }      # OR language spoken/ written/ signed = Odia
     9 OPTIONAL { ?item wdt:P569 ?birth  }
    10 OPTIONAL { ?item wdt:P19 ?pob  }
    11 OPTIONAL { ?item wdt:P570 ?death  }
    12 OPTIONAL { ?item wdt:P20 ?pod  }
    13 OPTIONAL { ?item wikibase:sitelinks ?linkcount. }  #count sitelinks
    14  ?item wikibase:statements ?statements . # for counting statements
    15   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }	# for generating label
    16  	}
    17 GROUP BY ?item ?statements ?linkcount ?itemLabel ?birth ?pobLabel ?death ?podLabel
    18 ORDER BY DESC(?linkcount)
    

Women elected to Odisha Legislative Assembly[edit]

The following query uses these:

Odia women (birth/ language) without an article in Odia Wikipedia[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID, place of birth (P19) View with Reasonator View with SQID, located in the administrative territorial entity (P131) View with Reasonator View with SQID, native language (P103) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID, date of birth (P569) View with Reasonator View with SQID, date of death (P570) View with Reasonator View with SQID, place of death (P20) View with Reasonator View with SQID
     1 SELECT ?item ?statements ?linkcount ?itemLabel ?itemDescription?birth ?pobLabel ?death ?podLabel
     2 WHERE {
     3 	?item wdt:P31 wd:Q5 . 	# item = humans only
     4   	?item wdt:P21 wd:Q6581072 .		  # gender = female only
     5 	{ ?item wdt:P19 wd:Q22048 }		# place of birth = Odisha (Q22048) 
     6 		UNION  { ?item wdt:P19 ?pob . ?pob wdt:P131* wd:Q22048 } 	# OR place of birth within Odisha. 
     7 			UNION {?item wdt:P103 wd:Q33810 }		# native language = Odia
     8 				UNION {?item wdt:P1412 wd:Q33810 }      # OR language spoken/ written/ signed = Odia
     9 OPTIONAL { ?item wdt:P569 ?birth  }
    10 OPTIONAL { ?item wdt:P19 ?pob  }
    11 OPTIONAL { ?item wdt:P570 ?death  }
    12 OPTIONAL { ?item wdt:P20 ?pod  }  
    13 OPTIONAL { ?item wikibase:sitelinks ?linkcount. }
    14 OPTIONAL { ?sitelink schema:about ?item . ?sitelink schema:inLanguage "or" }	# look for articles (sitelinks) in Odia ("or") 
    15 	FILTER (!BOUND(?sitelink))	# but select items with no such article
    16 	  ?item wikibase:statements ?statements . # for counting statements
    17   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }	# for generating label
    18 }
    19 GROUP BY ?item ?statements ?linkcount?itemLabel ?itemDescription?birth ?pobLabel ?death ?podLabel
    20 ORDER BY DESC(?linkcount)
    

Awards[edit]

Awards received by People of Odisha (birth place)[edit]

The following query uses these:

Padma Awardees of Odisha[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, award received (P166) View with Reasonator View with SQID, place of birth (P19) View with Reasonator View with SQID, located in the administrative territorial entity (P131) View with Reasonator View with SQID
     1 # Padma awardees from Odisha (birthplace), 70 Resulst @16 FEB 2019
     2 SELECT distinct ?item ?itemLabel ?itemDescription ?awardLabel ?linkcount
     3 WHERE {
     4   VALUES ?award {wd:Q949193 wd:Q30132541 wd:Q30132621 wd:Q30132672 wd:Q30132492 wd:Q30133065 wd:Q30132984 wd:Q60671348 wd:Q30132589 wd:Q60671291 wd:Q932650 wd:Q672392}
     5   ?item wdt:P31 wd:Q5.
     6   ?item wdt:P166 ?award.
     7    { ?item wdt:P19 wd:Q22048 }
     8  UNION  { ?item wdt:P19/ wdt:P131* wd:Q22048 }   
     9       OPTIONAL { ?item wikibase:sitelinks ?linkcount. }
    10   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    11 }
    12 ORDER BY DESC(?linkcount)
    13 limit 111
    

Sahitya Akademi Awarded Odia books[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, language of work or name (P407) View with Reasonator View with SQID, award received (P166) View with Reasonator View with SQID, notable work (P800) View with Reasonator View with SQID, point in time (P585) View with Reasonator View with SQID
     1 # Sahitya Akademi Awarded Odia books (48 Results, 16 JAN 2019)
     2 SELECT ?book ?bookLabel ?itemLabel ?year 
     3 WHERE {
     4   ?book wdt:P31 wd:Q571.
     5   ?book wdt:P407 wd:Q33810.
     6   ?book wdt:P166 wd:Q172582.
     7   
     8   ?item wdt:P31 wd:Q5.
     9   ?item wdt:P800 ?book.
    10   ?item p:P166 ?statement.
    11   ?statement ps:P166 wd:Q172582.
    12   ?statement pq:P585 ?year.
    13   
    14   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". }
    15 }
    16 ORDER BY DESC(?year)
    

OSA award winners who have a VIAF or an Open Library identifer[edit]

The following query uses these:

  • Properties: VIAF ID (P214) View with Reasonator View with SQID, Open Library ID (P648) View with Reasonator View with SQID, award received (P166) View with Reasonator View with SQID, point in time (P585) View with Reasonator View with SQID
     1 SELECT ?item ?itemLabel (YEAR(?time) AS ?date) ?viaf ?ol WHERE {
     2   ?item p:P166 ?node.
     3   ?node ps:P166 wd:Q6596243.
     4   OPTIONAL { ?node pq:P585 ?time. }
     5   OPTIONAL { ?item wdt:P214 ?viaf1. }
     6   OPTIONAL { ?item wdt:P648 ?ol1. }
     7   BIND(IF(BOUND(?ol1), ?ol1, "no OL identifier") AS ?ol)
     8   BIND(IF(BOUND(?viaf1), ?viaf1, "no VIAF identifier") AS ?viaf)
     9   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    10 }
    11 ORDER BY ?time
    

Co-awards for OSA award winners[edit]

The following query uses these:

  • Properties: award received (P166) View with Reasonator View with SQID
     1 SELECT ?number_of_corecipients ?award ?awardLabel
     2  WITH {
     3      SELECT ?award (COUNT(?recipient) AS ?number_of_corecipients) WHERE {
     4     ?recipient wdt:P166 wd:Q6596243 .
     5 	?recipient wdt:P166 ?award .
     6 			       FILTER (?award != wd:Q6596243)
     7      }
     8      GROUP BY ?award
     9  } AS %result
    10  WHERE {
    11      INCLUDE %result 
    12      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }  
    13  }
    14  ORDER BY DESC(?number_of_corecipients)
    

Gender distribution @ Odia Wiki[edit]

BubbleChart: Gender Balance in OdiaWiki Articles[edit]

The following query uses these:

Features: BubbleChart (Q24515280) View with Reasonator View with SQID

 1 #defaultView:BubbleChart
 2 PREFIX schema: <http://schema.org/>
 3 
 4 SELECT ?gender ?genderLabel(count(distinct?human) as ?number)
 5 WHERE
 6 {
 7 	?human wdt:P31 wd:Q5
 8 	; wdt:P21 ?gender.
 9     ?wikilink schema:about ?human.
10     ?wikilink schema:isPartOf <https://or.wikipedia.org/>.
11    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
12 }
13 GROUP BY ?gender ?genderLabel
14 LIMIT 6

Most gender-imbalanced occupations (P106) in Odia Wikipedia[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, country of citizenship (P27) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID, occupation (P106) View with Reasonator View with SQID
     1 # most Gender-imbalanced occupations in odia wikipedia 
     2 SELECT ?occupation ?occupationLabel ?women ?men WITH {
     3   SELECT ?occupation (SUM(?woman) AS ?women) (SUM(?man) AS ?men) WHERE {
     4     #BIND(wd:Q668 AS ?country). # substitute country of your choice here (remove the Q668, hit Ctrl+Space and start typing the country name, select the right one from the suggestions with the arrow keys and insert it with Enter)
     5     ?person wdt:P31 wd:Q5;.
     6     #?person wdt:P27 ?country. # remove this to search world-wide – results in query timeout unless you reduce the dataset in some other fashion
     7      ?person p:P106/ps:P106 ?occupation.
     8 ?article schema:about ?person . ?article schema:isPartOf <https://or.wikipedia.org/> .
     9     { ?person wdt:P21 wd:Q6581097. BIND(1 AS ?man). } UNION
    10     { ?person wdt:P21 wd:Q2449503. BIND(1 AS ?man). } UNION
    11     { ?person wdt:P21 wd:Q6581072. BIND(1 AS ?woman). } UNION
    12     { ?person wdt:P21 wd:Q1052281. BIND(1 AS ?woman). }
    13     # TODO consider how to count P21: Q48270 (genderqueer) and Q1097630 (intersex)
    14   }
    15   GROUP BY ?occupation
    16 } AS %results WHERE {
    17   INCLUDE %results. # subquery as optimization: don’t make the label service fetch labels for every ?person in the subquery
    18   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    19 }
    20 ORDER BY
    21 # divide ?variable+1 instead of ?variable to avoid division by zero
    22   # (unfortunately, we can’t use ABS(LOG(x/y)) instead of the IF() because SPARQL has no LOG function)
    23   DESC(IF(?women > ?men, (?women+1)/(?men+1), (?men+1)/(?women+1)))
    24   # if the ratio is the same, show results with more people in total first
    25   DESC(?women + ?men)
    

Number of OSA award recipients wrt. gender[edit]

The following query uses these:

  • Properties: award received (P166) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID
     1 SELECT ?count ?gender ?genderLabel 
     2 WITH {
     3   SELECT (COUNT(DISTINCT ?recipient) AS ?count) ?gender WHERE {
     4     ?recipient wdt:P166 wd:Q6596243 . 
     5     ?recipient wdt:P21 ?gender . 
     6   } 
     7   GROUP BY ?gender
     8 } AS %result
     9 WHERE {
    10   INCLUDE %result
    11   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } 
    12 } 
    13  ORDER BY DESC(?count)
    

Odia Film[edit]

Odia films @ Wikidata[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, original language of film or TV show (P364) View with Reasonator View with SQID, title (P1476) View with Reasonator View with SQID, publication date (P577) View with Reasonator View with SQID, director (P57) View with Reasonator View with SQID, composer (P86) View with Reasonator View with SQID
     1 #All Odia film @ Wikidata
     2 SELECT 
     3 ?item (COUNT(DISTINCT ?sitelink) AS ?sitelink) ?statements ?itemLabel ?year ?originaltitle ?directorLabel ?composerLabel
     4 WHERE
     5 {
     6 	?item wdt:P31 wd:Q11424 .
     7 	?item wdt:P364 wd:Q33810 . 
     8 	BIND(xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid) .
     9   ?item wikibase:statements ?statements . 
    10 	OPTIONAL { ?sitelink schema:about ?item . ?sitelink schema:inLanguage ?lang .  } . 
    11     OPTIONAL { ?item wdt:P1476 ?originaltitle }
    12   	OPTIONAL { ?item wdt:P577 ?date . BIND(YEAR(?date) as ?year) } 
    13   	OPTIONAL { ?item wdt:P57 ?director }
    14   	OPTIONAL { ?item wdt:P86 ?composer }
    15 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    16 }
    17 GROUP BY ?item ?statements ?itemLabel ?year ?originaltitle ?directorLabel ?composerLabel ?qid
    18 ORDER BY DESC(?statements)
    

Odia film articles not on the Odiawiki[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, original language of film or TV show (P364) View with Reasonator View with SQID, said to be the same as (P460) View with Reasonator View with SQID, part of (P361) View with Reasonator View with SQID
     1 #Odia film not on the Odia Wikipedia
     2 SELECT 
     3 ?item ?itemLabel (COUNT(DISTINCT ?sitelink) AS ?sitelink) 
     4 (GROUP_CONCAT(CONCAT("[", STR(?sitelink), " ", ?lang, "]"); SEPARATOR = ", ") AS ?wp) 
     5 WHERE
     6 {
     7 	?item wdt:P31 wd:Q11424 .
     8 	?item wdt:P364 wd:Q33810 . 
     9 	BIND(xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid) .
    10 	OPTIONAL { ?sitelink schema:about ?item . ?sitelink schema:inLanguage ?lang .  } . 
    11 	FILTER NOT EXISTS { ?wfr schema:about ?item . ?wfr schema:inLanguage "or" } 
    12 	FILTER NOT EXISTS { ?item wdt:P460 ?item2 . ?w2 schema:about ?item2 . ?w2 schema:inLanguage "or" } 
    13 	FILTER NOT EXISTS { ?item wdt:P361 ?item3 . ?w3 schema:about ?item3 . ?w3 schema:inLanguage "or" } 
    14   SERVICE wikibase:label { bd:serviceParam wikibase:language "or,en". }
    15 }
    16 GROUP BY ?item ?itemLabel ?qid
    17 ORDER BY DESC(?qid)
    

Odia film articles on the English Wiki but not on the Odiawiki[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, original language of film or TV show (P364) View with Reasonator View with SQID
     1 #Odia film with an article on the English Wikipedia but not on the Odia one
     2 SELECT ?item ?itemLabel (COUNT(distinct ?sitelink) as ?count)
     3 WHERE
     4 {
     5 	?item wdt:P31 wd:Q11424 .
     6 	?item wdt:P364 wd:Q33810 .
     7 	?sitelink schema:about ?item .
     8 	FILTER EXISTS { ?wen schema:about ?item . ?wen schema:inLanguage "en" }
     9 	FILTER NOT EXISTS { ?wor schema:about ?item . ?wor schema:inLanguage "or" }
    10 	SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .}
    11 }
    12 GROUP BY ?item ?itemLabel 
    13 ORDER BY DESC(?count)
    14 LIMIT 500
    

Odia films released per year[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, original language of film or TV show (P364) View with Reasonator View with SQID, publication date (P577) View with Reasonator View with SQID, point in time (P585) View with Reasonator View with SQID
    1 SELECT ?item ?yr ?ct 
    2 WHERE{ {SELECT (YEAR(?year) as ?yr) (COUNT(DISTINCT(?film)) As ?ct) 
    3 	WHERE { VALUES ?filmtype {wd:Q11424 wd:Q24862 wd:Q20667187 wd:Q226730} ?film wdt:P31 ?filmtype . ?film wdt:P364 wd:Q33810 . ?film wdt:P577 ?year } 
    4 	GROUP BY ?year ORDER BY DESC(?ct) 
    5 	} 
    6 	?item wdt:P31 wd:Q577 . ?item wdt:P585 ?pointintime . 
    7 	FILTER (year(?pointintime) = ?yr) } 
    8 GROUP BY ?yr ?item ?ct 
    9 ORDER BY DESC(?ct)
    

Dhira Biswal (Q20652472)'s contribution to Odia films[edit]

The following query uses these:

  • Items: Dhira Biswal (Q20652472) View with Reasonator View with SQID
    1 SELECT ?item ?itemLabel ?prop ?propLabel WHERE {
    2    ?prop wikibase:directClaim ?wt_prop .
    3    ?item ?wt_prop wd:Q20652472
    4    SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .}
    5 }
    

Uttam Mohanty (Q5223859) Filmography[edit]

title (P1476)[edit]

Label[edit]

Properties missing a label or description in a given language (ex: Odia)[edit]

SELECT ?property ?propertyLabel ?propertyDescription ?datatype ?missingLbl ?missingDesc WHERE {
  ?property wikibase:propertyType ?datatype .
  OPTIONAL { ?property rdfs:label ?missingLbl . FILTER(LANG(?missingLbl) = 'or') }
  OPTIONAL { ?property schema:description ?missingDesc . FILTER(LANG(?missingDesc) = 'or') }
  FILTER(!BOUND(?missingLbl)|| !BOUND(?missingDesc)) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}

Try it!

item that have orwiki sitelink and have alias but not in Odia language[edit]

The following query uses these:

  • Properties: official website (P856) View with Reasonator View with SQID
     1 SELECT ?item ?linkcount ?statements ?itemLabel ?alias 
     2 WHERE {
     3   ?item ^schema:about/schema:isPartOf/^wdt:P856 wd:Q7102897 .  
     4   ?item skos:altLabel ?alias .
     5   FILTER( LANG( ?alias ) = 'or' && REGEX( LCASE( STR( ?alias ) ), '[a-z]' ) ) .
     6     OPTIONAL { ?item wikibase:sitelinks ?linkcount. }  #count sitelinks
     7  ?item wikibase:statements ?statements . # for counting statements
     8 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }	# for generating label
     9 	}
    10 ORDER BY DESC(?linkcount)
    11 LIMIT 123
    

item that have orwiki sitelink but labels not in Odia[edit]

The following query uses these:

 1 SELECT ?item ?itemLabel WHERE {
 2   ?article schema:about ?item.
 3   ?article schema:isPartOf <https://or.wikipedia.org/>.
 4   OPTIONAL {
 5     ?item rdfs:label ?title.
 6     FILTER((LANG(?title)) = "or")
 7   }
 8   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 9   FILTER(!BOUND(?title))
10 }
11 LIMIT 234

Peoples with a given surname in Odia wikipedia (ex: 'ରଥ')[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID
    1 # all people with surname 'ରଥ' in Odia wikipedia
    2 SELECT ?item ?itemLabel 
    3 WHERE {
    4   ?wikilink schema:about ?item .  { ?wikilink schema:isPartOf <https://or.wikipedia.org/> . } 
    5     ?item wdt:P31 wd:Q5. # all humans 
    6     ?item rdfs:label ?itemLabel.
    7       FILTER (lang(?itemLabel) = "or") .
    8       FILTER regex (?itemLabel, "(ରଥ)$").		
    9 }
    

item that have labels in Odia (Ex.: Cricketers)[edit]

The following query uses these:

  • Properties: occupation (P106) View with Reasonator View with SQID
     1 SELECT ?item ?itemLabel ?odialabel  WHERE {
     2   {
     3     SELECT ?item WHERE {
     4       ?item wdt:P106 wd:Q12299841 .
     5     }
     6   }
     7   OPTIONAL {
     8     ?item rdfs:label ?label .
     9     BIND(STR(?label) AS ?odialabel) .
    10   }
    11   FILTER( REGEX(LANG(?label), '^or') ) . 
    12   FILTER( BOUND(?label) ) .
    13   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    14 } GROUP BY ?item ?itemLabel ?odialabel 
    15 ORDER BY ASC(?item)
    

Odia films that don't have a label in English[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, subclass of (P279) View with Reasonator View with SQID
     1 SELECT ?item ?Lor WHERE {
     2   ?item (wdt:P31/wdt:P279*) wd:Q11424.
     3   ?item rdfs:label ?Lor.
     4   FILTER(NOT EXISTS {
     5     ?item rdfs:label ?Len.
     6     FILTER((LANG(?Len)) = "en")
     7   })
     8   FILTER((LANG(?Lor)) = "or")
     9 }
    10 ORDER BY ?Lor
    11 LIMIT 123
    

Items that don't have a label in Odia, but the main category has a label in Odia[edit]

The following query uses these:

  • Properties: topic's main category (P910) View with Reasonator View with SQID
    1 # Items that don't have a label in Odia, but there is a main category that has a label in Odia.
    2 SELECT ?item ?itemLabel ?_topic_s_main_category ?_topic_s_main_categoryLabelOD
    3 WHERE {
    4   ?item wdt:P910 ?_topic_s_main_category.
    5   ?_topic_s_main_category rdfs:label ?_topic_s_main_categoryLabelOD filter (lang(?_topic_s_main_categoryLabelOD) = "or") .
    6   FILTER NOT EXISTS {?item rdfs:label ?itemLabelOD filter (lang(?itemLabelOD) = "or")} .
    7   }
    8 LIMIT 234
    

Labels ≠ Sitelink (All/ Category)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID
    1 SELECT ?item ?sitelink_label ?label ?wiki_sitelink WHERE{
    2   ?wiki_sitelink schema:about ?item; schema:isPartOf <https://or.wikipedia.org/>; schema:name ?sitelink_label .
    3   ?item rdfs:label ?label .
    4   FILTER(LANG(?label) = 'or') .
    5   FILTER(false = (LCASE(?sitelink_label) = LCASE(?label)) ) .
    6   FILTER(false=CONTAINS(?sitelink_label,")"))
    7   #?item wdt:P31 wd:Q4167836 .		#Remove the Hash (#) to get only categories
    8 }
    9 LIMIT 456
    

Most frequent occupations (P106) without a label in Odia language[edit]

The following query uses these:

  • Properties: occupation (P106) View with Reasonator View with SQID
     1 SELECT ?occup ?occupLabel ?count
     2 WHERE
     3 {
     4 	{
     5 		SELECT ?occup (COUNT(?person) as ?count)
     6 		WHERE
     7 		{
     8 			?person wdt:P106 ?occup
     9 		}
    10 		GROUP BY ?occup
    11 		ORDER BY DESC(?count)
    12 		LIMIT 1000
    13 	}
    14   	OPTIONAL {?occup rdfs:label ?label1 	filter(lang(?label1) = "or")}
    15 	FILTER(!BOUND(?label1))
    16   
    17     SERVICE wikibase:label { bd:serviceParam wikibase:language "hi,en" }
    18 }
    19 ORDER BY DESC(?count)
    20 LIMIT 111
    

Most frequent values in occupation (P106) without female form of label (P2521) in Odia[edit]

The following query uses these:

  • Properties: occupation (P106) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID, female form of label (P2521) View with Reasonator View with SQID, instance of (P31) View with Reasonator View with SQID
     1 PREFIX wd: <http://www.wikidata.org/entity/>
     2 PREFIX wdt: <http://www.wikidata.org/prop/direct/>
     3 PREFIX wikibase: <http://wikiba.se/ontology#>
     4 
     5 SELECT ?occup ?occupLabel ?count
     6 {
     7 	{
     8     SELECT ?occup (COUNT(?person) as ?count)
     9 	{
    10 		?person wdt:P106 ?occup.
    11 		?person wdt:P21 wd:Q6581072
    12     	OPTIONAL { ?occup wdt:P2521 ?flabel . BIND(lang(?flabel) as ?lang) . FILTER(?lang="or")} . FILTER(!BOUND(?lang))
    13         ?person wdt:P31 wd:Q5
    14 	}
    15 	GROUP BY ?occup 
    16 	ORDER BY DESC(?count)
    17 	LIMIT 100
    18     }
    19 	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } 
    20 }
    21 ORDER BY DESC(?count)
    

Articles in Odia Wikipedia[edit]

Indian subjects (excluding Indians) that has no articles in Odia[edit]

# Indian subjects (excluding Indians) that has no articles in Odia
SELECT ?item ?itemLabel ?cnt WHERE {
  {
    SELECT ?item (COUNT(?sitelink) AS ?cnt) WHERE {
     ?item wdt:P27|wdt:P205|wdt:P17 wd:Q668.
      MINUS { ?item wdt:P31 wd:Q5. }
      ?sitelink schema:about ?item.
      FILTER(NOT EXISTS {
        ?article schema:about ?item.
        ?article schema:isPartOf <https://or.wikipedia.org/>.
      })
    }
    GROUP BY ?item
    ORDER BY DESC(?cnt)
    LIMIT 100
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?cnt)

Try it!

All category that include the string "ଶ୍ରେଣୀ:ଓଡ଼ିଶାର"[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID
     1 # All category that include a given string 
     2 PREFIX schema: <http://schema.org/>
     3 
     4 SELECT ?item ?LabelES WHERE {
     5   ?item wdt:P31 wd:Q4167836.
     6   ?sitelink schema:about ?item.
     7   ?sitelink schema:isPartOf <https://or.wikipedia.org/>.
     8   ?sitelink schema:name ?LabelES.
     9   FILTER(REGEX(?LabelES, "^ଶ୍ରେଣୀ:ଓଡ଼ିଶାର .*"))
    10 }
    11 LIMIT 123
    

All articles which have a Commons Cat.[edit]

The following query uses these:

  • Properties: Commons category (P373) View with Reasonator View with SQID
    1 # All items with P373 and an orwiki article
    2 SELECT ?item ?commonscat ?sitelink ?lemma 
    3 WHERE {
    4   ?item wdt:P373 ?commonscat.
    5   ?sitelink schema:about ?item.
    6   ?sitelink schema:isPartOf <https://or.wikipedia.org/>.
    7   ?sitelink schema:name ?lemma.
    8 }
    9 LIMIT 123
    

Biography articles by citizenship[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, country of citizenship (P27) View with Reasonator View with SQID
     1 # Distribution of biography articles by citizenship on Odia Wikipedia:
     2 
     3 SELECT (count(?country) as ?count) ?countryLabel
     4 WHERE {
     5   ?item wdt:P31 wd:Q5. # all humans
     6   ?item wdt:P27 ?country. # who have some citizenship property
     7   
     8   ?article schema:about ?item. # and have an article about them
     9   ?article schema:isPartOf <https://or.wikipedia.org/> . # on *Odia* Wikipedia
    10 
    11   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    12 } GROUP BY ?countryLabel
    13 ORDER BY DESC(?count)
    

Most frequent occupations (P106) of people[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, occupation (P106) View with Reasonator View with SQID
     1 SELECT ?occupation (COUNT(?item) AS ?count) ?occupationLabel 
     2 WHERE {
     3   ?item wdt:P31 wd:Q5. # all humans
     4   ?item wdt:P106 ?occupation.
     5 
     6   ?article schema:about ?item. # and have an article about them
     7   ?article schema:isPartOf <https://or.wikipedia.org/> . # on *Odia* Wikipedia
     8   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
     9 } 
    10 GROUP BY ?occupation ?occupationLabel
    11 ORDER BY DESC(?count)
    

Articles with ASI Monument ID[edit]

The following query uses these:

  • Properties: ASI Monument ID (P1371) View with Reasonator View with SQID
    1 PREFIX schema: <http://schema.org/>
    2 SELECT ?item ?lemma WHERE {
    3   ?item wdt:P1371 ?identifier.
    4   ?article schema:about ?item. # and have an article about them
    5   ?article schema:isPartOf <https://or.wikipedia.org/> . # on *Odia* Wikipedia
    6   OPTIONAL { ?wikilink schema:name ?lemma. }
    7 }
    8 LIMIT 123
    

List Articles[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID
    1 # List of list articles 
    2 SELECT DISTINCT ?item ?itemLabel ?sitelink
    3 WHERE {
    4         ?item rdfs:label ?label; wdt:P31 wd:Q13406463.
    5         ?sitelink schema:about  ?item; schema:inLanguage "or"; schema:isPartOf <https://or.wikipedia.org/>
    6                 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    7 		}
    8 LIMIT 123
    

Visualizations[edit]

Map: Protected areas of Odisha[edit]

The following query uses these:

Features: Map (Q24515275) View with Reasonator View with SQID

 1 #defaultView:Map
 2 SELECT DISTINCT ?item ?itemLabel ?coor
 3 WHERE { 
 4   {
 5     SELECT ?item WHERE {
 6       ?item wdt:P31/wdt:P279* wd:Q473972 .
 7     }
 8   }
 9   ?item wdt:P131* wd:Q22048 .
10   OPTIONAL { ?item wdt:P625 ?coor. }
11   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
12 }

BubbleChart: Occupation of Odia people[edit]

The following query uses these:

Features: BubbleChart (Q24515280) View with Reasonator View with SQID

1 #Occupations of Odia people (ethnicity)
2 #defaultView:BubbleChart
3 SELECT DISTINCT ?occupationLabel (COUNT(*) AS ?count) WHERE {
4   ?person wdt:P31 wd:Q5.
5   ?person wdt:P172 wd:Q1983634.
6   OPTIONAL { ?person wdt:P106 ?occupation. }
7   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
8 }
9 GROUP BY ?occupationLabel

Graph: Family tree of Prithviraj Kapoor[edit]

#defaultView:Graph
SELECT ?level ?item ?relation ?linkTo ?itemLabel ?pic
{
  hint:Query hint:optimizer "None"
  { BIND(0 AS ?level) BIND(wd:Q560197 AS ?item) } UNION
  {
    VALUES ?relation { wdt:P22 wdt:P25 } 
    { BIND(1 AS ?level) BIND(wd:Q560197 AS ?linkTo) }
    UNION
    { BIND(2 AS ?level) ?linkTo wdt:P22|wdt:P25 wd:Q560197 }
    UNION
    { BIND(3 AS ?level) ?linkTo (wdt:P22|wdt:P25)/(wdt:P22|wdt:P25) wd:Q560197 }
    UNION
    { BIND(4 AS ?level) ?linkTo (wdt:P22|wdt:P25)/(wdt:P22|wdt:P25)/(wdt:P22|wdt:P25) wd:Q560197 }
    ?item ?relation ?linkTo
  }
  OPTIONAL { ?item wdt:P18 ?pic }
  SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"}
}
ORDER BY ?level

Try it!

Timeline: Odisha Sahitya Akademi Award winners[edit]

The following query uses these:

  • Properties: point in time (P585) View with Reasonator View with SQID
    1 #defaultView:Timeline
    2 SELECT ?winner ?winnerLabel ?when WHERE {
    3   ?winner ?p ?wds.
    4   ?wds ?v wd:Q6596243.
    5   ?wdP wikibase:statementProperty ?v.
    6   ?wdP wikibase:claim ?p.
    7   ?wds pq:P585 ?when .
    8   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    9 }
    

Bar Chart: Popular Odia surnames[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, family name (P734) View with Reasonator View with SQID, language of work or name (P407) View with Reasonator View with SQID
     1 #defaultView:BarChart
     2 #popular Odia surnames
     3 SELECT ?surname ?surnameLabel ?count
     4 WHERE {
     5   {
     6     SELECT ?surname (COUNT(?person) AS ?count) WHERE {
     7       ?person wdt:P31 wd:Q5.
     8       ?person wdt:P734 ?surname.
     9       ?surname wdt:P407 wd:Q33810.
    10     }
    11     GROUP BY ?surname
    12   }
    13   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    14 }
    15 ORDER BY DESC(?count)
    16 LIMIT 100
    

Count of items related to places in Odisha[edit]

The following query uses these:

  • Properties: located in the administrative territorial entity (P131) View with Reasonator View with SQID
     1 #Count of items related to places in Odisha (Q22048 )
     2 SELECT ?p ?pLabel  (COUNT(DISTINCT ?item) as ?ct) (SAMPLE(?item) as ?sample)  (SAMPLE(?itemLabel) as ?sampleLabel)
     3 WITH
     4 {
     5     SELECT ?place { ?place wdt:P131* wd:Q22048 }
     6 } as %inc
     7 WHERE
     8 {
     9   INCLUDE %inc 
    10   hint:Query hint:optimizer "None".          
    11   ?item ?wdt ?place .
    12   ?p wikibase:directClaim ?wdt .
    13   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?p rdfs:label ?pLabel }
    14 }
    15 GROUP BY ?p ?pLabel
    16 ORDER BY DESC(?ct)
    

Statements, Properties, Qualifiers[edit]

Items with most statements in Odia Wikipedia (Q7102897)[edit]

The following query uses these:

 1 # items with most statements in Odia wiki
 2 SELECT ?item ?itemLabel ?statements 
 3 WHERE {
 4   ?item wikibase:statements ?statements. hint:Prior hint:rangeSafe true.
 5   ?article schema:about ?item;
 6 	schema:isPartOf <https://or.wikipedia.org/> .
 7   FILTER(?statements >= 80)
 8   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 9 }
10 ORDER BY DESC(?statements)
11 LIMIT 123

Items with less than 11 statements in Odia Wikipedia[edit]

The following query uses these:

 1 # All pages in Odia Wiki with less than 11 statements
 2 SELECT ?item ?statementCount ?itemLabel ?article  WHERE {
 3   VALUES (?project ?maxStatementCount ?labelLanguage) {
 4     (<https://or.wikipedia.org/> 11 "or") # adjust language and count here
 5     # URL above must be https:// and include the trailing / !
 6   }
 7   ?article a schema:Article;
 8            schema:about ?item;
 9            schema:isPartOf ?project.
10   ?item wikibase:statements ?statementCount.
11   OPTIONAL { ?item rdfs:label ?itemLabel. 
12     FILTER(LANG(?itemLabel) = ?labelLanguage). }
13   	FILTER(?statementCount < ?maxStatementCount).
14 }
15 LIMIT 1000

Statements without a qualifier for a given property[edit]

The following query uses these:

  • Properties: award received (P166) View with Reasonator View with SQID
     1 # Award received = OSA without qualifier point in time
     2 SELECT ?item ?itemLabel WHERE {
     3   ?item p:P166 ?award_statement.
     4   ?award_statement ps:P166 wd:Q26764742.
     5   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
     6   FILTER(NOT EXISTS {
     7     ?award_statement ?pq_pred ?pq_obj.
     8     ?prop wikibase:qualifier ?pq_pred.
     9   })
    10 }
    11 LIMIT 123
    

Statements without a reference for a given property[edit]

The following query uses these:

  • Properties: award received (P166) View with Reasonator View with SQID
     1 # Statements without a reference for a given property
     2 PREFIX prov: <http://www.w3.org/ns/prov#>
     3 
     4 SELECT ?item ?itemLabel WHERE {
     5   ?item p:P166 ?award_statement.
     6   ?award_statement ps:P166 wd:Q26764742.
     7   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
     8   FILTER(NOT EXISTS { ?award_statement prov:wasDerivedFrom ?ref. })
     9 }
    10 LIMIT 123
    

Properties used for an item[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, subclass of (P279) View with Reasonator View with SQID
     1 # Most used properties for Hindu temple
     2 SELECT ?property ?propertyLabel ?count ?avg WITH {
     3   SELECT ?property (COUNT(DISTINCT ?item) AS ?count) (COUNT(DISTINCT ?statement)/COUNT(DISTINCT ?item) AS ?avg) WHERE {
     4     ?item wdt:P31/wdt:P279* wd:Q842402;
     5           ?p ?statement.
     6     ?property a wikibase:Property;
     7               wikibase:claim ?p.
     8   }
     9   GROUP BY ?property
    10   ORDER BY DESC(?count)
    11 } AS %results WHERE {
    12   INCLUDE %results.
    13   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    14 }
    15 ORDER BY DESC(?count)
    

Most popular qualifiers for most popular properties[edit]

The following query uses these:

  • Properties: award received (P166) View with Reasonator View with SQID
     1 # Most used qualifiers for most used properties of Odisha Sahitya Akademi award winners
     2 SELECT ?prop ?propLabel ?count ?qualifiers WHERE {
     3   {
     4     SELECT ?p (COUNT(DISTINCT ?item) AS ?count) (GROUP_CONCAT(DISTINCT ?q; SEPARATOR = ", ") AS ?qualifiers) WHERE {
     5       ?item wdt:P166 wd:Q6596243.
     6       ?item ?p _:b54.
     7       ?p ^wikibase:claim _:b55.
     8       OPTIONAL {
     9         {
    10           SELECT ?p (CONCAT(STRAFTER(STR(?qualifier), STR(<http://www.wikidata.org/prop/qualifier/>)), ": ", STR(COUNT(DISTINCT ?statement))) AS ?q) WHERE {
    11             _:b56 wdt:P166 wd:Q6596243.
    12             _:b56 ?p ?statement.
    13             ?p ^wikibase:claim _:b57.
    14             ?statement ?qualifier _:b58.
    15             ?qualifier ^wikibase:qualifier _:b59.
    16           }
    17           GROUP BY ?p ?qualifier
    18         }
    19       }
    20     }
    21     GROUP BY ?p
    22   }
    23   ?prop wikibase:claim ?p.
    24   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    25 }
    26 ORDER BY DESC(?count)
    

Human (Q5)[edit]

Human (Q5) on Odia Wikipedia (Q7102897)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID, date of birth (P569) View with Reasonator View with SQID, place of birth (P19) View with Reasonator View with SQID
     1 #Humans on Odiawiki
     2 PREFIX schema: <http://schema.org/>
     3 SELECT ?human ?humanLabel ?genderLabel ?humanDescription ?pobLabel ?dob 
     4 WHERE
     5 {
     6 	?human wdt:P31 wd:Q5
     7 	; wdt:P21 ?gender.
     8     ?wikilink schema:about ?human.
     9     ?wikilink schema:isPartOf <https://or.wikipedia.org/>.
    10  		OPTIONAL { ?human wdt:P569 ?dob  }
    11   		OPTIONAL { ?human wdt:P19 ?pob  }
    12    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    13 }
    14 GROUP BY ?human ?humanLabel ?gender ?genderLabel ?humanDescription ?pobLabel ?dob 
    15 ORDER BY ?dob
    

Human (Q5) on Odia Wikipedia (Q7102897) and date of birth (P569) on a specific day (ex:26th January)[edit]

The following query uses these:

  • Properties: date of birth (P569) View with Reasonator View with SQID
     1 SELECT ?item ?itemLabel ?date ?article  WHERE {
     2   ?item ^schema:about ?article .
     3   ?article schema:isPartOf <https://or.wikipedia.org/> .
     4 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
     5   ?date_node wikibase:timePrecision "11"^^xsd:integer . 
     6 		?date_node wikibase:timeValue ?date . 
     7 	FILTER (month(?date) = 1 && day(?date) = 26 ) 
     8 		?item p:P569/psv:P569 ?date_node . 
     9   
    10 }
    

Human (Q5) on Odia Wikipedia (Q7102897) and date of death (P570) is in 2017[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, date of death (P570) View with Reasonator View with SQID
     1 SELECT ?item ?itemLabel ?itemDescription ?dod
     2 WHERE {
     3   ?item wdt:P31 wd:Q5 .
     4   ?item wdt:P570 ?time0 .
     5   ?orwiki_sitelink schema:about ?item; schema:isPartOf <https://or.wikipedia.org/> .
     6   FILTER ( ?time0 >= "2017-01-01T00:00:00Z"^^xsd:dateTime && ?time0 < "2018-01-01T00:00:00Z"^^xsd:dateTime )
     7   OPTIONAL { ?item wdt:P570 ?dod  }
     8 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
     9 }
    10 ORDER BY ?dod
    11 LIMIT 56
    

Unmarried Human (Q5) @ Odia Wikipedia (Q7102897)[edit]

The following query uses these:

  • Properties: sex or gender (P21) View with Reasonator View with SQID, date of birth (P569) View with Reasonator View with SQID, place of birth (P19) View with Reasonator View with SQID, spouse (P26) View with Reasonator View with SQID
     1 #Unmarried Human @ Odiawiki
     2 PREFIX schema: <http://schema.org/>
     3 SELECT ?human ?humanLabel ?genderLabel ?humanDescription ?pobLabel ?dob 
     4 WHERE {
     5   ?human p:P26 ?spouceStatement .
     6   ?spouceStatement a wdno:P26 .
     7 	?wikilink schema:about ?human.
     8 	?wikilink schema:isPartOf <https://or.wikipedia.org/>.
     9   OPTIONAL { ?human wdt:P21 ?gender. }
    10   OPTIONAL { ?human wdt:P569 ?dob. }
    11   OPTIONAL { ?human wdt:P19 ?pob. }
    12   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    13 }
    14 GROUP BY ?human ?humanLabel ?gender ?genderLabel ?humanDescription ?pobLabel ?dob
    15 ORDER BY ?dob
    16 LIMIT 123
    

Citizens (P27) of India (Q668) and date of death (P570) is today[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, country of citizenship (P27) View with Reasonator View with SQID, date of death (P570) View with Reasonator View with SQID
     1 SELECT ?item ?itemLabel ?date
     2 WHERE {
     3 ?date_node wikibase:timePrecision "11"^^xsd:integer .
     4 ?date_node wikibase:timeValue ?date .
     5 FILTER (year(?date) > 1898 && day(?date) = day(now()) && month(?date) = month(now()))
     6 ?item p:P570/psv:P570 ?date_node .
     7 ?item wdt:P31 wd:Q5 .
     8 ?item wdt:P27 wd:Q668 .
     9 SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .}
    10 }
    11 ORDER BY DESC(?date) ?item LIMIT 123
    

Citizens (P27) of India (Q668) and date of birth (P569) on a specific day (ex:15th August)[edit]

The following query uses these:

  • Properties: date of birth (P569) View with Reasonator View with SQID, image (P18) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID, occupation (P106) View with Reasonator View with SQID, country of citizenship (P27) View with Reasonator View with SQID
     1 #People born on Independence day
     2 PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
     3 PREFIX schema: <http://schema.org/>
     4 
     5 SELECT ?personItem ?wikis ?person ?personDescription ?date ?Occupation ?Gender ?image  
     6 (IF(BOUND(?personDescription), CONCAT(?person, " (", ?personDescription, ")"), ?person) AS ?title) 
     7 WHERE {
     8   {
     9     SELECT ?personItem ?date ?occupationItem ?genderItem (SAMPLE(?image) AS ?image) (COUNT(DISTINCT ?article) AS ?wikis) 
    10       WHERE {
    11       ?personItem wdt:P569 ?date.
    12       ?personItem wdt:P18 ?image.
    13       ?personItem wdt:P21 ?genderItem.
    14       ?personItem wdt:P106 ?occupationItem.
    15       ?personItem wdt:P27 wd:Q668 .
    16       OPTIONAL {
    17         ?article schema:about ?personItem.
    18         FILTER((SUBSTR(STR(?article), 12, 19)) = "wikipedia.org/wiki/")
    19       }
    20       FILTER(((DATATYPE(?date)) = xsd:dateTime) && ((MONTH(?date)) = 8) && ((DAY(?date)) = 15))
    21     }
    22     GROUP BY ?personItem ?date ?occupationItem ?genderItem
    23   }
    24   SERVICE wikibase:label {
    25     bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
    26     ?personItem schema:description ?personDescription.
    27     ?personItem rdfs:label ?person.
    28     ?occupationItem rdfs:label ?Occupation.
    29     ?genderItem rdfs:label ?Gender.
    30   }
    31 }
    32 ORDER BY DESC(?rank)
    

Female (Q6581072) Citizens (P27) of India (Q668) without an article in Odia Wikipedia (Q7102897)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, sex or gender (P21) View with Reasonator View with SQID, country of citizenship (P27) View with Reasonator View with SQID
     1 PREFIX schema: <http://schema.org/>
     2 PREFIX hint: <http://www.bigdata.com/queryHints#>
     3 
     4 SELECT ?item ?itemLabel ?itemDescription (COUNT(DISTINCT ?article) AS ?count) WHERE {
     5   {
     6     SELECT ?item WHERE {
     7       {
     8         hint:Query hint:optimizer "None".
     9         ?item wdt:P31 wd:Q5. # all humans
    10         ?item wdt:P21 wd:Q6581072.
    11         ?item wdt:P27 wd:Q668.
    12         MINUS {
    13           ?sitelinkhy schema:about ?item.
    14           ?sitelinkhy schema:isPartOf <https://or.wikipedia.org/>.
    15         }
    16       }
    17       ?article schema:about ?item.
    18       { ?article schema:isPartOf <https://en.wikipedia.org/>. }
    19     }
    20   }
    21   ?article schema:about ?item.
    22   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
    23 }
    24 GROUP BY ?item ?itemLabel ?itemDescription
    25 ORDER BY DESC(?count)
    26 LIMIT 123
    

Maintenance @ Odia Wikipedia (Q7102897)[edit]

Articles without the property instance of (P31)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, subclass of (P279) View with Reasonator View with SQID
     1 #items without instance of and subclass of
     2 SELECT ?item ?statements ?linkcount ?itemLabel 
     3 WHERE {
     4  ?wikilink schema:about ?item .
     5   { ?wikilink schema:isPartOf <https://or.wikipedia.org/> . }
     6 ?item wikibase:sitelinks [] .
     7 MINUS { ?item (wdt:P31|wdt:P279) [] } .
     8  ?item wikibase:statements ?statements . # for counting statements
     9 OPTIONAL { ?item wikibase:sitelinks ?linkcount. } # for counting sitelinks
    10 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } # for generating label
    11 }
    12 GROUP BY ?item ?statements ?linkcount ?itemLabel 
    13 ORDER BY ASC (?linkcount)
    


All items with less than 11 statements linked with Odia Wikipedia[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, subclass of (P279) View with Reasonator View with SQID
     1 # All items with less than 11 statements linked with Odia Wikipedia
     2 SELECT ?item ?linkcount?statementCount ?itemLabel ?itemDescription ?article  WHERE {
     3   VALUES (?project ?maxStatementCount ?labelLanguage) {
     4     (<https://or.wikipedia.org/>11 "or") # adjust language and count here
     5     # URL above must be https:// and include the trailing / !
     6   }
     7   ?article a schema:Article;
     8            schema:about ?item;
     9            schema:isPartOf ?project.
    10   ?item wikibase:statements ?statementCount.
    11   ?item wikibase:sitelinks [] .
    12   MINUS { ?item (wdt:P31|wdt:P279) [] } .
    13   OPTIONAL { ?item rdfs:label ?itemLabel. 
    14     FILTER(LANG(?itemLabel) = ?labelLanguage). }
    15   	FILTER(?statementCount < ?maxStatementCount).
    16   OPTIONAL { ?item wikibase:sitelinks ?linkcount. } # for counting sitelinks
    17   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } # for generating label
    18 }
    19 ORDER BY ASC ( ?linkcount)
    20 LIMIT 1000
    

People born before the year 1900, but no date of death (P570)[edit]

The following query uses these:

  • Properties: date of birth (P569) View with Reasonator View with SQID, date of death (P570) View with Reasonator View with SQID
     1 # People born before the year 1900, but no date of death (P570) 
     2 SELECT DISTINCT ?item ?itemLabel
     3 WHERE {
     4   ?wikilink schema:about ?item .
     5   { ?wikilink schema:isPartOf <https://or.wikipedia.org/> . } 
     6   ?item p:P569 ?birthclaim .
     7   MINUS { ?item p:P570 [] }
     8   ?birthclaim ps:P569 ?birth .
     9   FILTER(?birth < "+1900-00-15T00:00:00Z"^^xsd:dateTime) .
    10   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
    11 }
    12 LIMIT 100
    

People without Country of Citizenship (P27)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, country of citizenship (P27) View with Reasonator View with SQID
     1 #People without Country of Citizenship (P27)
     2 SELECT ?item ?statements (COUNT(distinct ?sitelink) as ?sites) ?itemLabel  
     3 WHERE {
     4 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }	# for generating label
     5 BIND(xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid) .   ?item wikibase:statements ?statements . # for counting statements
     6 OPTIONAL { ?sitelink schema:about ?item . ?sitelink schema:inLanguage ?lang } # for counting sitelinks
     7 ?item wdt:P31 wd:Q5 .
     8   MINUS { ?item wdt:P27 [] . }
     9   ?article schema:about ?item .
    10   ?article schema:isPartOf <https://or.wikipedia.org/> .
    11   ?item wikibase:statements ?statements .   	
    12   }
    13 GROUP BY ?item ?statements ?itemLabel  
    14 ORDER BY ASC(?sites)
    

Human (Q5) who don’t speak (P1412) their native language (P103)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, native language (P103) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID
    1 # people who don’t speak (P1412) their native language (P103)
    2 SELECT ?person ?personLabel ?languageLabel WHERE {
    3 ?article schema:about ?person . ?article schema:isPartOf <https://or.wikipedia.org/> .
    4   ?person wdt:P31 wd:Q5;
    5           wdt:P103 ?language.
    6   MINUS { ?person wdt:P1412 ?language. }
    7   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
    8 }
    

Human (Q5) with surname 'ପଟ୍ଟନାୟକ' (Q21492602) in Odia wikipedia and not mentioned in Wikidata[edit]

Notification-icon-Wikidata-logo.svg

Related Wikidata project: WikiProject Names

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, family name (P734) View with Reasonator View with SQID
     1 # to find all people with last name 'ପଟ୍ଟନାୟକ' (Q21492602) in Odia wikipedia and not mentioned in Wikidata)
     2 SELECT ?item ?itemLabel (COUNT(distinct ?sitelink) as ?count)
     3 WHERE {
     4   ?wikilink schema:about ?item .  { ?wikilink schema:isPartOf <https://or.wikipedia.org/> . }
     5     ?item wdt:P31 wd:Q5. # all humans
     6   MINUS { ?item wdt:P734 [] . } # surname not mentioned in Wikidata
     7     ?item rdfs:label ?itemLabel.
     8       FILTER (lang(?itemLabel) = "or") .
     9       FILTER regex (?itemLabel, "(ପଟ୍ଟନାୟକ)$").   
    10           OPTIONAL { ?sitelink schema:about ?item . ?sitelink schema:inLanguage ?lang }
    11 }
    12 GROUP BY ?item ?itemLabel
    13 ORDER BY DESC(?count)
    14 LIMIT 123
    

Writers (Q36180) without VIAF identifier (P214)[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, occupation (P106) View with Reasonator View with SQID, languages spoken, written or signed (P1412) View with Reasonator View with SQID, VIAF ID (P214) View with Reasonator View with SQID
     1 # Authors/ Writers with links to Odia Wikipedia or Wikisource, but missing VIAF id
     2 SELECT ?item ?statements ?itemLabel 
     3 WHERE {
     4   ?item wdt:P31 wd:Q5 .
     5   ?item wdt:P106 wd:Q36180 .
     6   #?item wdt:P1412 wd:Q33810 . 
     7   # Here we ask people with no VIAF id
     8   FILTER NOT EXISTS { ?item wdt:P214 ?viaf . }
     9   # But the ones we already know they don't have one show up anyway
    10   # so we filter out people with "No value" for VIAF id
    11   FILTER NOT EXISTS { ?item rdf:type wdno:P214 . }
    12   
    13   ?wikilink schema:about ?item .
    14   { ?wikilink schema:isPartOf <https://or.wikisource.org/> . } 
    15   UNION {?wikilink schema:isPartOf <https://or.wikipedia.org/> . }
    16  ?item wikibase:statements ?statements .  
    17   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
    18 }
    19 ORDER BY DESC(?statements)
    

Notable works (with an Odia Wikipedia article) by authors who have no notable works[edit]

The following query uses these:

  • Properties: author (P50) View with Reasonator View with SQID, notable work (P800) View with Reasonator View with SQID
    1 SELECT DISTINCT ?work ?workLabel ?author ?authorLabel ?article WHERE {
    2 ?work wdt:P50 ?author .
    3 ?article schema:about ?work;
    4 	schema:isPartOf <https://or.wikipedia.org/> .
    5 MINUS {?author wdt:P800 []}
    6 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    7 } ORDER BY ?authorLabel
    

Odia books which is not mentioned under notable work(s) of authors[edit]

The following query uses these:

Odia books with out genre[edit]

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, language of work or name (P407) View with Reasonator View with SQID, author (P50) View with Reasonator View with SQID, genre (P136) View with Reasonator View with SQID
     1 SELECT ?item ?statements (COUNT(distinct ?sitelink) as ?sites) ?itemLabel ?genreLabel ?writerLabel
     2 WHERE {
     3   ?item wdt:P31 wd:Q571.
     4   ?item wdt:P407 wd:Q33810.
     5       OPTIONAL { ?item wdt:P50 ?writer  }
     6       OPTIONAL { ?item wdt:P136 ?genre  }
     7 BIND(xsd:integer(STRAFTER(str(?item), "Q")) AS ?qid) .   ?item wikibase:statements ?statements . # for counting statements
     8 OPTIONAL { ?sitelink schema:about ?item . ?sitelink schema:inLanguage ?lang } # for counting sitelinks  	
     9 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }	# for generating label
    10 }
    11 GROUP BY ?item ?statements ?itemLabel ?genreLabel ?writerLabel
    12 ORDER BY ASC(?genreLabel)
    

list of articles which are on orwiki but not on enwiki[edit]

The following query uses these:

1 SELECT ?item ?itemLabel ?or_article_name ?orSitelink with {select ?item ?or_article_name ?orSitelink 
2 WHERE {
3   ?orSitelink schema:about ?item; schema:isPartOf <https://or.wikipedia.org/>; schema:name ?or_article_name .
4   } } as %i
5 where {include %i
6   filter not exists {  ?enSitelink schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> .}
7   SERVICE wikibase:label { bd:serviceParam wikibase:language "or, en" }
8 } order by ?or_article_name

Test[edit]

Plants (Q756) that have labels in Odia[edit]

  1. Not showing 'BaragacHa' to be fixed

The following query uses these:

  • Properties: instance of (P31) View with Reasonator View with SQID, subclass of (P279) View with Reasonator View with SQID
     1 SELECT ?item ?odialabel ?itemLabel WHERE {
     2   {
     3     SELECT ?item WHERE {
     4       ?item wdt:P31/wdt:P279* wd:Q756 .
     5     }
     6   }
     7   OPTIONAL {
     8     ?item rdfs:label ?label .
     9     BIND(STR(?label) AS ?odialabel) .
    10   }
    11   FILTER( REGEX(LANG(?label), '^or') ) . 
    12   FILTER( BOUND(?label) ) .
    13   SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
    14 } GROUP BY ?item ?itemLabel ?odialabel 
    15 ORDER BY ASC(?odialabel)