SPARQL examples: Difference between revisions

m (1 revision imported: Import pages from backup)
(fix prefixes)
Line 3: Line 3:
== Simple Queries ==
== Simple Queries ==
=== Complete Dependency Graph ===
=== Complete Dependency Graph ===
 
{{#widget:SPARQLquery|code=
{{SPARQL|query=#defaultView:Graph
#defaultView:Graph
PREFIX grt: <https://graphit.ur.de/prop/direct/>
SELECT ?item ?itemLabel ?class ?classLabel ?image ?dependency ?dependencyLabel WHERE {
SELECT ?item ?itemLabel ?class ?classLabel ?image ?dependency ?dependencyLabel WHERE {
   ?item wdt:P1 ?dependency.
   ?item grt:P1 ?dependency.
   ?item wdt:P2 ?class
   ?item grt:P2 ?class
   OPTIONAL{ ?item wdt:P9 ?image.}
   OPTIONAL{ ?item grt:P9 ?image.}
   OPTIONAL{ ?class wdt:P9 ?image.}
   OPTIONAL{ ?class grt:P9 ?image.}
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
}
}}
}}

Revision as of 07:26, 26 April 2023

This page is automatically parsed by the query page to provide examples.

Simple Queries

Complete Dependency Graph