Main Page/UsingTheQueryService

  • 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". } }