SupportQuota: check if a TicketID is set and return if not. Get all data with one ANSI SQL statement (well, not exactly as there is a subquery). The new SQL should now be portable between DBMS supported by OTRS, but it was tested only in MySQL and MariaDB. I do not have access to PostgreSQL, Oracle or MSSQL to proceed with further tests. I appreciate if someone out there could validate the new SQL on these.
SupportQuota: better and standardized SQL formatting according to http://www.dpriver.com/pp/sqlformat.htm.
SupportQuota: release 0.0.4.