Difference between revisions of "Help:SPARQL"

From Wikibase Personal data
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 11: Line 11:
  
 
== Specifics here ==
 
== Specifics here ==
 +
On this site, it is customary to use some prefixes:
 +
 +
{{#tag:syntaxhighlight|PREFIX pdio: <https://wiki.personaldata.io/entity/>
 +
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
 +
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
 +
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
 +
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>|lang="sparql"}}
 +
 +
This replicates the same [https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Prefixes_used prefix scheme for Wikidata] (see also [https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual#Basics_-_Understanding_Prefixes here]).
  
 
== Example queries here ==
 
== Example queries here ==
 +
 +
Many queries on this site use the template [https://wiki.personaldata.io/w/index.php?title=Template:SPARQL&action=edit Template:SPARQL].
 +
You can therefore find these examples by looking for the [[Special:WhatLinksHere/Template:SPARQL|pages pointing to that exact template]].
  
 
[[Category:Help]]
 
[[Category:Help]]

Latest revision as of 20:35, 20 January 2020

SPARQL is the query language used by the query service.

You can read more about SPARQL here, on Wikidata. This has different parts:

Specifics here

On this site, it is customary to use some prefixes:

PREFIX pdio: <https://wiki.personaldata.io/entity/>
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>

This replicates the same prefix scheme for Wikidata (see also here).

Example queries here

Many queries on this site use the template Template:SPARQL. You can therefore find these examples by looking for the pages pointing to that exact template.