Intro to SPARQL (Part4)

Numerical operations using MAX, MIN, COUNT, SUM and AVG keywords.

  • MAX gives the maximum of a given set of integer values.
  • MIN gives minimum of a given set of integer values.
  • COUNT counts number of triples returned.
  • SUM gives the sum of a set of integer values.
  • AVG gives the average of a set of integer values.
normal select query

MAX

return maximum caloric value

MIN

return minimum caloric value

COUNT

return the count of results returned

SUM

sum of all values returned for ?caloryvalue

AVG

return average of the results returned for ?caloryvalue

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store