SPARQL Tips
Jump to navigation
Jump to search
PREFIXES
in Wikidata prefixes don't need to be specified explicitly in SPARQL queries. However, in our Wikibase.cloud instance, prefixes must be explicitly stated, as this example shows. Please note and mind the distinction between PREFIX kbwdt, kbwd, wdt and wd.
The following query uses these:
PREFIX rlwd: <https://riga-literata.wikibase.cloud/entity/>
PREFIX rlwdt: <https://riga-literata.wikibase.cloud/prop/direct/>
SELECT ?item ?itemLabel
WHERE
{
?item rlwdt:P1 rlwd:Q6.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,[AUTO_LANGUAGE]". }
}