@prefix dcterms: <http://purl.org/dc/terms/> .
@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#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:064 a sh:SPARQLExecutable,
       sh:SPARQLSelectExecutable ;
    rdfs:label "Pathways with Multiple Authors"@en ;
    rdfs:comment "Counts how many pathways have at least N authors for each author ordinal position, showing the distribution of author counts across pathways."@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dc:    <http://purl.org/dc/elements/1.1/>
PREFIX wpq:   <http://www.wikidata.org/prop/qualifier/>

SELECT ?atLeast (COUNT(DISTINCT ?pathway) AS ?count) WHERE {
  ?author_ a foaf:Person ;
    wp:hasAuthorship ?authorship .
  ?authorship ^wp:hasAuthorship ?pathway ;
    wpq:series_ordinal ?atLeast .
} GROUP BY ?atLeast
  ORDER BY ASC(xsd:integer(?atLeast))""" ;
    schema:target <https://sparql.wikipathways.org/sparql> ;
    schema:keywords "authors" ;
    dcterms:source <https://github.com/wikipathways/SPARQLQueries/blob/85c9912c600413a9ae0f5f9a3529420e38747f04/J.%20Authors/pathwayCountWithAtLeastXAuthors.rq> ;
    dcterms:modified "2026-03-08"^^xsd:date ;
    dcterms:license <https://www.gnu.org/licenses/gpl-3.0.html> .
