SPARQL examples: Difference between revisions

From Dariah-Lab
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:


=== <!--T:541--> Cats ===
=== <!--T:541--> Cats ===
{{SPARQL|query=SELECT ?item ?itemLabel
{{SPARQL|query=SELECT ?institution ?institutionLabel
WHERE  
WHERE  
{
{
   ?item wdt:P31 wd:Q146. # <!--T:680--> Must be of a cat
   ?institution wdt:P47 wd:Q467. #Must be instance of an institution
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # <!--T:681--> Helps get the label in your language, if not, then en language
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". # Helps get the label in your language, if not, then en language
}
}
}}
}}


=== <!--T:541--> Institutions ===
=== <!--T:541--> Institutions ===

Revision as of 09:17, 11 May 2022

This page is parsed by the web interface of the query service to fill the query example dialog.

Simple queries

Cats

Template:SPARQL

Institutions

 SELECT ?institution ?institutionLabel WHERE {
     SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
     ?institution wdt:P47 wd:Q467.
 }