@prefix cito: <http://purl.org/spar/cito/> .
@prefix ex: <https://bigcat-um.github.io/sparql-examples/WikiPathways/> .
@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#> .
@prefix spex: <https://purl.expasy.org/sparql-examples/ontology#> .

ex:078 a sh:SPARQLExecutable,
       sh:SPARQLSelectExecutable ;
    rdfs:label "Metabolite Identifier Count per Data Source"@en ;
    rdfs:comment "Counts the distinct metabolite identifiers per data source. ChEBI, HMDB and LIPID MAPS are the main data sources for metabolite identifiers."@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>

SELECT (str(?datasource) as ?source) (count(distinct ?identifier) as ?count)
WHERE {
  ?mb a wp:Metabolite ;
    dc:source ?datasource ;
    dc:identifier ?identifier .
}
GROUP BY ?datasource
ORDER BY DESC(?count)""" ;
    schema:target <https://sparql.wikipathways.org/sparql> ;
    schema:keywords "metabolite", "data sources", "counts" ;
    cito:usesMethodIn <https://www.wikipathways.org/metabolome.html> .
