@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_00299 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins interacting with small molecules according to DrugBank"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX db: <http://nextprot.org/rdf/db/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?entry (group_concat(distinct str(?lbl); SEPARATOR = ";") as ?mol) WHERE {
 ?entry :isoform / :smallMoleculeInteraction / :interactant ?ref .
 ?ref :provenance db:DrugBank.
 ?ref rdfs:label ?lbl.
}
group by ?entry""" ;
    schema:keywords "small molecule interaction",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

