@prefix ex: <https://sparql.orthodb.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:13 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "List all xrefs attached to the groups annotated with at least three Interpro domains (IPR011990, IPR013083 and IPR001841)"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://purl.orthodb.org/>
PREFIX interpro: <http://www.ebi.ac.uk/interpro/entry/>

SELECT ?og ?og_description (group_concat(distinct ?xref; SEPARATOR="; ") as ?xrefs)
WHERE {
    ?og a :OrthoGroup; :name ?og_description.
    ?og :xref [a :Xref; :xrefResource ?xref].
    ?og :xref [a :Xref; :xrefResource interpro:IPR011990].
    ?og :xref [a :Xref; :xrefResource interpro:IPR013083].
    ?og :xref [a :Xref; :xrefResource interpro:IPR001841].
} GROUP BY ?og ?og_description
ORDER BY ?og_description
""" ;
    schema:target <https://sparql.orthodb.org/sparql/> .

