sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

1

Select the SwissLipids categories and their labels.

Use at

PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

# Example 1
SELECT ?category ?label
WHERE
{
    ?category SWISSLIPID:rank SWISSLIPID:Category .
    ?category rdfs:label ?label .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?category"):::projected 
  v2("?label"):::projected 
  c2(["SWISSLIPID:Category"]):::iri 
  v1 --"SWISSLIPID:rank"-->  c2
  v1 --"rdfs:label"-->  v2