Main Page/UsingTheQueryService

From LD4 WBStack Test
Revision as of 10:41, 23 May 2022 by TrMendenhall (talk | contribs) (Added text to second example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • This query selects all Institutions in this Wikibase instance and retrieves their local Q-Number and label

SELECT ?institution ?institutionLabel WHERE { ?institution <http://ld4-wbs-test.wiki.opencura.com/prop/direct/P1> <http://ld4-wbs-test.wiki.opencura.com/entity/Q25> ; <http://www.w3.org/2000/01/rdf-schema#label> ?institutionLabel . }

  • This query selects all "preferred local labels," the authorized access point of the headings they replace, and the institution(s) that use them. Note that the SERVICE command invokes the Wikibase label service, which functions the same in a local Wikibase instance as it does in Wikidata.

SELECT ?preferredLocalLabel ?replacesLabel ?institutionLabel WHERE { ?preferredLocal <http://ld4-wbs-test.wiki.opencura.com/prop/direct/P1> <http://ld4-wbs-test.wiki.opencura.com/entity/Q12> ; <http://ld4-wbs-test.wiki.opencura.com/prop/direct/P4> ?replaces ; <http://ld4-wbs-test.wiki.opencura.com/prop/direct/P3> ?institution . SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }