@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_00030 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins whose gene is located in chromosome 2 that belongs to families with at least 5 members in the human proteome"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

select ?entry WHERE {
 ?entry :familyName / :term/^:term/^:familyName ?member.
 ?entry :gene / :chromosome "2"^^xsd:string .
} group by ?entry having ( count(distinct ?member) >= 5 )""" ;
    schema:keywords "chromosomal location",
        "family",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

