query-a37ef054fd49088ba49389163f5ef55c

rq turtle/ttl

21:36, 18 September 2023 (UTC)) talk (Slieb17Not sure why his page wouldn't be included in the results, or how to modify the query to ensure that it is. Any help would be greatly appreciated. 22:24, 18 September 2023 (UTC)) talk (Pere prlpzA query including all values (or all non deprecated values) is possible but a bit more complex, or at least less usual.-- I don't know if singer should be Q-Tip's preferred occupation of if this is an error to be fixed in his item. , and Q-Tip is not included in your query.(Q2252262)rapper , therefore this value is used, not (Q177220)singer is (Q42025)Q-Tip : As far as I know, prefix wdt means "truthy" statements, that is the values of maximum rank for the property. If there is no value of preferred rank, all normal rank values are included, but if there is at least one value with preferred rank only preferred values are returned. The preferred occupation for Slieb17@:: After a bit of research I think I got it: Slieb17@

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?rapper ?rapperLabel WHERE {

    ?rapper p:P106 ?statement. 
    ?statement ps:P106 wd:Q2252262.

SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}

ORDER BY (?rapperLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?rapper"):::projected v1("?rapperLabel"):::projected v3("?statement") c5(["bd:serviceParam"]):::iri c3(["wd:Q2252262"]):::iri c7(["en"]):::literal v2 --"p:P106"--> v3 v3 --"p:statement/P106"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end