#
# example SPARQL query 109
#

@prefix schema: <https://schema.org/> . 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
@prefix sh: <http://www.w3.org/ns/shacl#> . 
@prefix cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/> .


cello:Query_109 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """All the different sarcomas represented in Cellosaurus"""@en ; 
    schema:keywords "disease" , "sarcoma" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
# All NCiT terms child of C9118 "Sarcoma"
select distinct ?concept_id ?concept_label where {
  ?concept  cello:more_specific_than+ ?generic_concept .
  ?concept skos:notation ?concept_id ; skos:prefLabel ?concept_label .
  # ?generic_concept rdfs:label "Sarcoma" . # we use skos:notation instead
  ?generic_concept skos:notation "C9118" .
}
limit 100
    """
    .

