query-3ed8309c43dedad55af748148475f077

rq turtle/ttl

Query for sl.wikisource ]reply[20:57, 8 October 2016 (UTC)) talk (JanezdrilcHi. I would need a query for sl.wikisource persons that are born (P569) or died (P570) on some day (October 17, for example). --: Hmm, I don't remember, how to get "specific date" (other than today) in SPARQL, so it's not exactly what you want, but this should be a good start:Janezdrilc@

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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?article ?dob WHERE {
    ?item wdt:P31 wd:Q5 .
    ?item wdt:P569 ?dob .

   FILTER (datatype(?dob) = xsd:dateTime)   
  # FILTER (month(?dob) = month(now()))
   #FILTER (day(?dob) = day(now()))
    ?article schema:about ?item .
    ?article schema:isPartOf <https://sl.wikisource.org/>.
    SERVICE wikibase:label {
       bd:serviceParam wikibase:language "sl,en" .
    }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?article"):::projected v1("?dob"):::projected v2("?item"):::projected c7([https://sl.wikisource.org/]):::iri c9(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri c11(["sl,en"]):::literal f0[["?dob = 'xsd:dateTime'"]] f0 --> v1 v2 --"wdt:P31"--> c3 v2 --"wdt:P569"--> v1 v3 --"schema:about"--> v2 v3 --"schema:isPartOf"--> c7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end