SPARQL2: Difference between revisions
(replace with MediaWiki version) |
(added: Usage) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<!-- | |||
-->{{ItemOrNot|Items used|{{#invoke:SPARQL|getItems|{{{query}}} }} }} | -->{{ItemOrNot|Items used|{{#invoke:SPARQL|getItems|{{{query}}} }} }} | ||
{{ItemOrNot|Properties used|{{#invoke:SPARQL|getProperties|{{{query}}} }} }} | {{ItemOrNot|Properties used|{{#invoke:SPARQL|getProperties|{{{query}}} }} }} | ||
{{#tag:syntaxhighlight|{{SPARQLText|query={{{query}}}|extraprefix={{{extraprefix|}}} }}|lang="sparql"}} | {{#tag:syntaxhighlight|{{SPARQLText|query={{{query}}}|extraprefix={{{extraprefix|}}} }}|lang="sparql"}} | ||
[ | [https://query.graphit.ur.de/#{{urlencode: {{SPARQLText|query={{{query}}}|extraprefix={{{extraprefix|}}} }} | PATH }} Try it!] | ||
<noinclude> | |||
= Usage = | |||
<pre style="background-color:#F5F5F5"> | |||
{ | {{SPARQL2|query= | ||
#defaultView:Graph | |||
PREFIX wdt: <https://graphit.ur.de/prop/direct/> | |||
SELECT ?item ?itemLabel ?class ?classLabel ?image ?dependency ?dependencyLabel WHERE { | |||
?item wdt:P1 ?dependency. | |||
?item wdt:P2 ?class | |||
OPTIONAL{ ?item wdt:P11 ?image.} | |||
OPTIONAL{ ?class wdt:P11 ?image.} | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |||
} | } | ||
</ | }} | ||
</pre> | |||
</noinclude> | </noinclude> |
Latest revision as of 13:39, 9 October 2023
{{{query}}}
Usage
{{SPARQL2|query= #defaultView:Graph PREFIX wdt: <https://graphit.ur.de/prop/direct/> SELECT ?item ?itemLabel ?class ?classLabel ?image ?dependency ?dependencyLabel WHERE { ?item wdt:P1 ?dependency. ?item wdt:P2 ?class OPTIONAL{ ?item wdt:P11 ?image.} OPTIONAL{ ?class wdt:P11 ?image.} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } }}