query-e60e7487b4415217814788e7ae54fd1d

rq turtle/ttl

find the Wikidata item for a person with given family name, date of birth and date of death SELECT ?artist ?artistLabel ?dob ?dod WHERE { VALUES ?artistName { "Mechlen" } ?artist wdt:P569 ?dob; wdt:P570 ?dod; rdfs:label ?artistLabel. FILTER((LANG(?artistLabel)) = "de") FILTER(CONTAINS(?artistLabel, ?artistName)) FILTER(("1888-01-01"^^xsd:dateTime <= ?dob) && (?dob < "1889-01-01"^^xsd:dateTime)) FILTER(("1961-01-01"^^xsd:dateTime <= ?dod) && (?dod < "1962-01-01"^^xsd:dateTime)) }

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# find the Wikidata item for a person with given family name, date of birth and date of death
SELECT ?artist ?artistLabel ?dob ?dod WHERE {
  VALUES ?artistName {
    "Mechlen"
  }
  ?artist wdt:P569 ?dob;
    wdt:P570 ?dod;
    rdfs:label ?artistLabel.
    FILTER((LANG(?artistLabel)) = "de")
    FILTER(CONTAINS(?artistLabel, ?artistName))
    FILTER(("1888-01-01"^^xsd:date <= ?dob) && (?dob < "1889-01-01"^^xsd:dat))
    FILTER(("1961-01-01"^^xsd:date <= ?dod) && (?dod < "1962-01-01"^^xsd:dat))
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?artist"):::projected v3("?artistLabel"):::projected v5("?artistName") v2("?dob"):::projected v1("?dod"):::projected f0[["'1961-01-01^^xsd:date' <= ?dod?dod < s1962-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f0 --> v1 f1[["'1888-01-01^^xsd:date' <= ?dob?dob < s1889-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f1 --> v2 f2[["contains(?artistLabel,?artistName)"]] f2 --> v3 f2 --> v5 f3[["?artistLabel = 'de'"]] f3 --> v3 bind4[/VALUES ?artistName/] bind4-->v5 bind40(["Mechlen"]) bind40 --> bind4 v5 --"wdt:P569"--> v2 v5 --"wdt:P570"--> v1 v5 --"rdfs:label"--> v3