Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The query creates a year variable for each publication and uses it to count publications by year.  It uses the same selection criteria as the query above.

Code Block
titleCount publications by year
linenumberstrue
SELECT ?year (COUNT(DISTINCT ?pub) AS ?count)
WHERE{
    ?pub vivo:hasPublicationVenue ?venue .
    
    ?venue rdf:type bibo:Journal .
    ?venue bibo:issn ?issn .
    ?venue rdfs:label ?venue_label .

    ?pub rdfs:label $pub_label .
  
    ?pub vivo:dateTimeValue ?dtv . 
    ?dtv vivo:dateTime ?dt .
    BIND(SUBSTR(str(?dt),1,4) AS ?year) 
}
GROUP BY ?year
ORDER BY DESC(?year)

...