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 functionsAllowance for sorting using either
ORDER BY
orGROUP 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. After we code the initial variable assignments, we can then move on to revise the web interface to support the new functionality. The virtue of this process is that we do not introduce variables without support—to do so would seed security and stability...