@prefix ex:<https://purl.expasy.org/sparql-examples/neXtProt/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:NXQ_00124 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "What are the 25 most frequent families with member count"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

select (str(?famlab) as ?familylabel) (count(distinct(?member)) as ?membercnt) where{
 ?member :familyName /:term /:childOf / rdfs:label ?famlab .
} group by ?famlab
order by desc(?membercnt)
limit 25""" ;
    schema:keywords "family",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

