#
# example SPARQL query 126
#

@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_126 a sh:SPARQLExecutable ;
    sh:prefixes _:sparql_examples_prefixes ;
    rdfs:comment """Top 100 population (ethnic grouping) of the individual from which human cell lines were sampled"""@en ; 
    schema:keywords "pop" , "population" , "stats" ; 
    schema:target <https://sparql.cellosaurus.org/sparql> ; 
    sh:select """
PREFIX cello: <https://purl.expasy.org/cellosaurus/rdf/ontology/>
select ?population_name (count(?cl) as ?cl_count) where {
        ?cl cello:derivedFromIndividualBelongingToPopulation ?pop.
        ?pop cello:name ?population_name .
  filter not exists { ?cl cello:hasParentCellLine ?any_parent }
}
group by ?population_name
order by desc(count(?cl))
limit 100
    """
    .

