#
# example SPARQL query 144
#

@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_144 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Names of all the species of sturgeons represented in Cellosaurus"""@en ; 
    schema:keywords "species" , "sturgeons" , "Acipenseridae" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
PREFIX db: <https://purl.expasy.org/cellosaurus/rdf/db/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
# All Taxonomy names with a  child of  Taxid:7900 (Acipenseridae)
select distinct ?xref_db ?xref_ac ?xref_label where {
  ?species  cello:isIdentifiedByXref ?xref .
  ?xref cello:more_specific_than+ ?generic_concept .
  ?generic_concept skos:notation "7900" ; skos:inScheme db:NCBI_TaxID . # Acipenseridae
  ?xref cello:accession ?xref_ac ; cello:database ?xref_db; skos:prefLabel ?xref_label . # we have always one and only one skos:prefLabel
}
limit 100
    """
    .

