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

ex:2 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Retrieve the identifiers for N,N-dimethyl-beta-alanine in external databases. This crosslinking of external identifiers is the core of MNXref."@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX mnx: <https://rdf.metanetx.org/schema/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

# Retrieve the identifiers for *N,N-dimethyl-beta-alanine* in
# external databases. This crosslinking of external
# identifiers is the core of MNXref.

SELECT ?metabolite ?xref
WHERE {
    ?metabolite a mnx:CHEM .
    ?metabolite rdfs:comment 'N-nitrosomethanamine' .
    ?metabolite mnx:chemXref ?xref
}""" ;
    schema:target <https://rdf.metanetx.org/sparql/> .

