Collapse AllExpand All

6.2.1. Query Source

The SELECT clause in the SQL statement that is used in the report's query definition is shown below. It is important to note two factors in relation to this query source:

  • The existing report definition's query source was not modified in any way to accommodate the graph.

  • The SQL utilizes embedded PL/pgSQL (the PostgreSQL Procedural Language) functions summTransR(), summTransI(), summTransS(), summTransC() and summTransA() to actually query the table invhist.

SELECT clause contains columns for graphing

Ultimately the query returns values for columns: received, issued, sold, scrap, adjustments, and period. These will be used in the graph's definition to supply the dynamic data upon which the resulting graph will render the information visually.