#
# example SPARQL query 127
#

@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_127 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Top 100 parent cell lines (from which other cell lines have been derived)"""@en ; 
    schema:keywords "ch" , "child" , "stats" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
select ?cl ?cl_name (count(?child) as ?child_count) where {
  ?cl cello:recommendedName ?cl_name .
  ?cl cello:hasChildCellLine ?child .
}
group by ?cl ?cl_name
order by desc(count(?child))
limit 100
    """
    .

