Project: Incorporating aggregate functions

Building support for aggregate functions into our web application requires some revision of code that we have already written. As shown in this chapter, all aggregate functions work with the SELECT keyword. We will thus need to change how we support that kind of query. By the end of this section, we will build the following functionality into the web application:

  • Support for all calculating functions
  • Support for use of DISTINCT in conjunction with calculating functions
  • Allowance for sorting using either ORDER BY or GROUP BY
  • Return results in a tabular format

The order of development when revising a project should be inside out. Revise the relevant function and develop outward, through the main() function. ...

Get MySQL for Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.