query-fa788da6fbf62cefcceb41fc290d1f24
PRASANGA PANJIKA: Odia people whose birth/death anniversary is in a desired month SELECT ?item ?sitelinks ?orwiki ?itemDescription ?dob ?dod (GROUP_CONCAT(DISTINCT ?awardLabel; SEPARATOR = ", ") AS ?awards) (COUNT(DISTINCT ?award) AS ?awardn) WHERE { {?item wdt:P19 wd:Q22048 .} UNION { ?item wdt:P19 ?pob . ?pob wdt:P131* wd:Q22048 } UNION {?item wdt:P103|wdt:P1412|wdt:P6886 wd:Q33810 } # native/ spoken/ written/ signed = Odia ?item wdt:P166 ?award. # item must have received an award
BIRTH AND DEATH
OPTIONAL { ?item wdt:P569 ?dob } OPTIONAL { ?item wdt:P570 ?dod } FILTER(MONTH(?dob)= 9 || MONTH(?dod) = 9)
____Odia Wiki link and article name__
?item ^schema:about ?article . ?article schema:isPartOf https://or.wikipedia.org/ ; # the sitelink points to or.wikipedia schema:name ?orwiki . # and has an article name
____Label service__
SERVICE wikibase:label { bd:serviceParam wikibase:language "or,[AUTO_LANGUAGE]". ?item schema:description ?itemDescription . ?award rdfs:label ?awardLabel. } OPTIONAL { ?item wikibase:sitelinks ?sitelinks. } #count sitelinks } GROUP BY ?item ?sitelinks ?orwiki ?itemDescription ?dob ?dod ORDER BY DESC(?awardn)
Use at
- https://query.wikidata.org/sparql
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# PRASANGA PANJIKA: Odia people whose birth/death anniversary is in a desired month
SELECT ?item ?sitelinks ?orwiki ?itemDescription ?dob ?dod
(GROUP_CONCAT(DISTINCT ?awardLabel; SEPARATOR = ", ") AS ?awards) (COUNT(DISTINCT ?award) AS ?awardn)
WHERE {
{?item wdt:P19 wd:Q22048 .}
UNION { ?item wdt:P19 ?pob . ?pob wdt:P131* wd:Q22048 }
UNION {?item wdt:P103|wdt:P1412|wdt:P6886 wd:Q33810 } # native/ spoken/ written/ signed = Odia
?item wdt:P166 ?award. # item must have received an award
#___BIRTH AND DEATH___
OPTIONAL { ?item wdt:P569 ?dob }
OPTIONAL { ?item wdt:P570 ?dod }
FILTER(MONTH(?dob)= 9 || MONTH(?dod) = 9)
# ____Odia Wiki link and article name__
?item ^schema:about ?article .
?article schema:isPartOf <https://or.wikipedia.org/> ; # the sitelink points to or.wikipedia
schema:name ?orwiki . # and has an article name
# ____Label service__
SERVICE wikibase:label {
bd:serviceParam wikibase:language "or,[AUTO_LANGUAGE]".
?item schema:description ?itemDescription .
?award rdfs:label ?awardLabel.
}
OPTIONAL { ?item wikibase:sitelinks ?sitelinks. } #count sitelinks
}
GROUP BY ?item ?sitelinks ?orwiki ?itemDescription ?dob ?dod
ORDER BY DESC(?awardn)