query-64ba8bb453bb2884bffb4e13ed521d00

rq turtle/ttl

way to search for surnames in labels? statement, if I want to find everyone with one surname I have to search in labels. The basic query which I found for the purpose is (using the name Beaupre as example): (P734)family name Because not every person has a } FILTER(CONTAINS (?itemLabel, "Beaupre")) ?item rdfs:label ?itemLabel . ?item wdt:P31 wd:Q5 . WHERE {SELECT ?item ?itemLabel 13:34, 1 May 2020 (UTC)) talk (Levana Taylor is still much too broad. Is there a way of searching all Q5 whatsoever? also, how would you write the string search to only find your match at the end of the label? (Q6581097)male This works but can only do it without timing out if I specify a very restricted set of items to search, such as everything with a certain external identifier; (P734)family name You still can use 15:00, 1 May 2020 (UTC)) talk (Dipsacus fullonum: I thought of a way to do almost do it: You can use Wikidata's MediaWiki API to search labels in a specific language, and do that from SPARQL code. Please wait while I make a query for that. --Levana Taylor@ 14:44, 1 May 2020 (UTC)) talk (Dipsacus fullonum to match at end of the label only. However there is no way of searching all labels of persons using the Query Service. There are millions of persons with even more millions of labels, so it is impossible to search all in 60 seconds (the limit for timeout) without restricting the set of items as you describe. You will have to use some other tools (I don't know any which can be used here but they could exit without me knowing them) or analyze a Wikidata database dump. --CONTAINS instead of STRENDS: To take the last question first: You can use the function Levana Taylor@

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
select ?item {
  ?item wdt:P734/wdt:P527* wd:Q4877609 .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected a1((" ")) c3(["wd:Q4877609"]):::iri v1 --"wdt:P734"--> a1 a1 --"wdt:P527"--> c3