User:Rocky 734/Query
Jump to navigation
Jump to search
People whose birth place is Odisha
[edit]The following query uses these:
- Items: human (Q5)
, Odisha (Q22048)
- Properties: instance of (P31)
, place of birth (P19)
, located in the administrative territorial entity (P131)
, date of birth (P569)
, image (P18)
, VIAF ID (P214)
, IMDb ID (P345)
# 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:Q22048 # place of birth is within Odisha. 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)
human (Q5) whose native language (P103) or languages spoken, written or signed (P1412) is Santali (Q33965)
[edit]The following query uses these:
- Items: human (Q5)
, Santali (Q33965)
- Properties: instance of (P31)
, native language (P103)
, languages spoken, written or signed (P1412)
# Humans whose native language or spoken/written language is Santali SELECT distinct ?item ?wikis ?itemLabel ?itemDescription WHERE { ?item wdt:P31 wd:Q5. # item is a human {?item wdt:P103 wd:Q33965 } UNION {?item wdt:P1412 wd:Q33965 } OPTIONAL { ?item wikibase:sitelinks ?wikis. } #count sitelinks SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } } ORDER BY DESC(?wikis)
Sahitya Akademi Awarded Santali books
[edit]The following query uses these:
- Items: literary work (Q7725634)
, Santali (Q33965)
- Properties: instance of (P31)
, language of work or name (P407)
# Sahitya Akademi Awarded Santali books SELECT ?item ?ilkn WHERE { ?item wdt:P31 wd:Q7725634; wdt:P407 wd:Q33965. OPTIONAL { ?item rdfs:label ?ilkn. FILTER((LANG(?ilkn)) = "sat") } }
list of articles which are on Santali Wiki but not on English Wiki
[edit]The following query uses these:
SELECT ?item ?itemLabel ?sat_article_name ?orSitelink with {select ?item ?sat_article_name ?satSitelink
WHERE {
?satSitelink schema:about ?item; schema:isPartOf <https://sat.wikipedia.org/>; schema:name ?sat_article_name .
} } as %i
where {include %i
filter not exists { ?enSitelink schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "sat,en" }
} order by ?sat_article_name
Plants name in Santali language
[edit]The following query uses these:
- Items: plant (Q756)
- Properties: instance of (P31)
, subclass of (P279)
SELECT ?item ?santalilabel ?itemLabel WHERE { { SELECT ?item WHERE { ?item wdt:P31/wdt:P279* wd:Q756 . } } OPTIONAL { ?item rdfs:label ?label . BIND(STR(?label) AS ?santalilabel) . } FILTER( REGEX(LANG(?label), '^sat') ) . FILTER( BOUND(?label) ) . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } GROUP BY ?item ?itemLabel ?santalilabel ORDER BY ASC(?santalilabel)
Santali People with less than 06 statements
[edit]The following query uses these:
- Items: human (Q5)
- Properties: instance of (P31)
# All Humans with less than 6 statements linked with Santali Wikipedia SELECT ?item ?linkcount ?statementCount ?itemLabel ?itemDescription ?article WHERE { VALUES (?project ?maxStatementCount ?labelLanguage) { (<https://sat.wikipedia.org/>6 "sat") # adjust language and count here # URL above must be https:// and include the trailing / ! } ?item wdt:P31 wd:Q5 . # item = humans only ?article a schema:Article; schema:about ?item; schema:isPartOf ?project. ?item wikibase:statements ?statementCount. FILTER(?statementCount < ?maxStatementCount). OPTIONAL { ?item rdfs:label ?itemLabel. FILTER(LANG(?itemLabel) = ?labelLanguage). } OPTIONAL { ?item wikibase:sitelinks ?linkcount. } # for counting sitelinks SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } # for generating label } ORDER BY ASC (?statementCount) LIMIT 123
Wikidata Items without the property instance of (P31)
[edit]- Source query: items with no P31 (March 2017)
The following query uses these:
- Properties: instance of (P31)
, subclass of (P279)
SELECT ?item ?itemLabel ?statements ?sites WHERE { ?item wikibase:sitelinks [] . MINUS { ?item (wdt:P31|wdt:P279) [] } . ?wikilink schema:about ?item . { ?wikilink schema:isPartOf <https://sat.wikipedia.org/> . } OPTIONAL { ?item wikibase:statements ?statements .} # for counting statements OPTIONAL { ?item wikibase:sitelinks ?sites. } # for counting sitelinks SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } # for generating label } ORDER BY ASC (?sites)
Wikidata Items without any Wikibase Statement
[edit]- Source query: items without any statement (Mary 2022)
The following query uses these:
SELECT ?item ?itemLabel
WHERE
{
?item wikibase:statements "0"^^xsd:integer .
?wpPage schema:about ?item;
schema:isPartOf <https://sat.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "or, en" . } # for generating label
}
Bar Chart: Popular Santali surnames
[edit]The following query uses these:
- Items: human (Q5)
, Santali (Q33965)
- Properties: instance of (P31)
, family name (P734)
, language of work or name (P407)
#defaultView:BarChart #popular Santali surnames SELECT ?surname ?surnameLabel ?count WHERE { { SELECT ?surname (COUNT(?person) AS ?count) WHERE { ?person wdt:P31 wd:Q5. ?person wdt:P734 ?surname. ?surname wdt:P407 wd:Q33965. } GROUP BY ?surname } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC(?count) LIMIT 100
BubbleChart: Occupation of Santali people
[edit]The following query uses these:
- Items: human (Q5)
, Santal people (Q1260346)
- Properties: instance of (P31)
, ethnic group (P172)
, occupation (P106)
Features: BubbleChart (Q24515280)
#Occupations of Santal people (ethnicity)
#defaultView:BubbleChart
SELECT DISTINCT ?occupationLabel (COUNT(*) AS ?count) WHERE {
?person wdt:P31 wd:Q5;
wdt:P172 wd:Q1260346.
OPTIONAL { ?person wdt:P106 ?occupation. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?occupationLabel
Items in Santali language
[edit]The following query uses these:
- Items: Santali (Q33965)
- Properties: language of work or name (P407)
, image (P18)
#Items in Santali language (any) SELECT ?item ?label ?_image WHERE { ?item wdt:P407 wd:Q33965. SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?label } OPTIONAL { ?item wdt:P18 ?_image. } }