SPARQL examples: Difference between revisions

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




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

Revision as of 08:23, 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.
 }