This directory contains SQL queries which can be used to extract useful 
statistics from Beaker's database directly. These queries are intended
to aid Beaker's integration directly into an organisation's existing business
intelligence tools, rather than providing an independent reporting
capability via the main XML-RPC server.

These SQL queries are tested in bkr.inttest.server.test_reporting_queries to 
make sure there are no schema changes which unwittingly break the query or 
affect its accuracy.

Queries are written using the MySQL SQL dialect, and the automated tests
only check them against MySQL. To help avoid excessive use of MySQL-specific
constructs, while still allowing the use of a reasonable selection of
functions, it is preferred that the queries also run against a Teiid view
of the Beaker database, with only qualification of table names and changes
to function invocation needed. However, this additional level of compatibility
is not tested automatically and is not guaranteed - some queries may still
require structural changes to work well with data sharing tools like Teiid.

Relevant MySQL --> Teiid conversion notes:

    ROUND(x) --> ROUND(X, 0)
    SECOND, DAY, etc --> SQL_TSI_SECOND, SQL_TSI_DAY, etc
    '2012-01-01 00:00:00' --> {ts '2012-01-01 00:00:00'}
    UTC_TIMESTAMP() --> NOW()
