Help:SPARQL query examples: Difference between revisions

From DataTrek
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
   <h3>Dogs</h3>
   <h3>Dogs</h3>
</div>
</div>
<syntaxhighlight lang="sparql">
SELECT ?dog ?dogLabel WHERE {
  ?dog prefix:P1 prefix:Q3
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
</syntaxhighlight>
== Queries with dogs ==
=== Dogs ===
<syntaxhighlight lang="sparql">
<syntaxhighlight lang="sparql">
SELECT ?dog ?dogLabel WHERE {
SELECT ?dog ?dogLabel WHERE {

Revision as of 23:49, 9 January 2025

Queries with cats

Cats

SELECT ?cat ?catLabel WHERE {
  ?cat prefix:P1 prefix:Q2
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}

Queries with dogs

Dogs

SELECT ?dog ?dogLabel WHERE {
  ?dog prefix:P1 prefix:Q3
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}


Queries with dogs

Dogs

SELECT ?dog ?dogLabel WHERE {
  ?dog prefix:P1 prefix:Q3
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}