query-d2b47548703368efc4e7f7e2578fc6f9

rq turtle/ttl

Calendar of saints' feast days

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?monthLabel (?day_int as ?d) ?saintLabel (URI(CONCAT("https://tools.wmflabs.org/reasonator/?q=", SUBSTR(STR(?saint),32) )) as ?link) WHERE {
{ SELECT ?month_int ?month ?day_int ?saint WHERE {
?month wdt:P31 wd:Q47018901; wdt:P1545 ?month_ordinal.
?day p:P361 [ps:P361 ?month; pq:P1545 ?day_ordinal ].
 BIND(xsd:integer(?month_ordinal) AS ?month_int)
 BIND(xsd:integer(?day_ordinal) AS ?day_int)
?saint wdt:P841 ?day # saint's feast day
}  }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?month_int ?d ?saintLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?d") v7("?day") v8("?day_int"):::projected v6("?day_ordinal") v10("?link") v4("?month") v8("?month_int") v5("?month_ordinal") v9("?saint"):::projected v3("?saintLabel"):::projected a1((" ")) c9(["bd:serviceParam"]):::iri c2(["wd:Q47018901"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal v4 --"p:direct/P31"--> c2 v4 --"p:direct/P1545"--> v5 a1 --"p:statement/P361"--> v4 a1 --"p:qualifier/P1545"--> v6 v7 --"p:P361"--> a1 bind0[/"http://www.w3.org/2001/XMLSchema#integer(?month_ordinal)"/] v5 --o bind0 bind0 --as--o v8 bind1[/"http://www.w3.org/2001/XMLSchema#integer(?day_ordinal)"/] v6 --o bind1 bind1 --as--o v8 v9 --"p:direct/P841"--> v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind2[/"?day_int"/] v8 --o bind2 bind2 --as--o v10 bind3[/"concat('https://tools.wmflabs.org/reasonator/?q=',substring(str(?saint),'32^^xsd:integer'))"/] v9 --o bind3 bind3 --as--o v10