@prefix ex: <https://sparql.uniprot.org/.well-known/sparql-examples/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:32 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Find UniProtKB entries with more than 1 <a href=\"https://www.uniprot.org/help/topo_dom\">Topological domain annotation</a>"^^rdf:HTML ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT 
    ?protein 
    (GROUP_CONCAT(?comment; separator=", ") AS ?comments)
WHERE
{
    ?protein a up:Protein ;
            up:annotation ?annotation . 
    ?annotation rdf:type up:Topological_Domain_Annotation ;
            rdfs:comment ?comment .
} 
GROUP BY ?protein 
HAVING (COUNT(?annotation) > 1)""" ;
    schema:keywords "transmembrane" , "topology" , "count" ;
    schema:target <https://sparql.uniprot.org/sparql/> .

