Project:SPARQL/examples: Difference between revisions
Jump to navigation
Jump to search
(Created page with "These SPARQL queries [https://riga-literata.wikibase.cloud/query/ can be used] in the local Query Service. See Wikidata's tutorial for an overview. The custom prefix declarations are required, and do not autocomplete (<code>wd:</code> and <code>wdt:</code>does, but actually queries Wikidata). ==Start== ===All editions with publication date ordered by date=== <SPARQL> PR...") |
No edit summary |
||
Line 7: | Line 7: | ||
PREFIX rlwdt: <https://riga-literata.wikibase.cloud/prop/direct/> | PREFIX rlwdt: <https://riga-literata.wikibase.cloud/prop/direct/> | ||
SELECT ? | SELECT ?edition ?editionLabel ?date | ||
WHERE | WHERE | ||
{ | { | ||
? | ?edition rlwdt:P1 rlwd:Q3033; | ||
rlwdt:P49 ?date. | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "la, | SERVICE wikibase:label { bd:serviceParam wikibase:language "en,la,lv". } | ||
} | } | ||
ORDER BY ?date | |||
</SPARQL> | </SPARQL> |
Latest revision as of 09:38, 23 February 2023
These SPARQL queries can be used in the local Query Service. See Wikidata's tutorial for an overview. The custom prefix declarations are required, and do not autocomplete (wd:
and wdt:
does, but actually queries Wikidata).
Start
All editions with publication date ordered by date
PREFIX rlwd: <https://riga-literata.wikibase.cloud/entity/>
PREFIX rlwdt: <https://riga-literata.wikibase.cloud/prop/direct/>
SELECT ?edition ?editionLabel ?date
WHERE
{
?edition rlwdt:P1 rlwd:Q3033;
rlwdt:P49 ?date.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,la,lv". }
}
ORDER BY ?date