maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #02691
Re: Bug in MAX() function?
Hi
On Fri, 2015-06-19 at 10:59 +0200, Benoit Panizzon wrote:
> Hi all
>
> I stumbled over that problem, while trying to graph mail traffic..
>
> I have two different counters for emails sent with authentication and without.
> Aggregated per hour.
>
> I would like to total the both values per row, to create a graph of outgoing
> emails per hour.
>
> MariaDB [maildb]> select mail_out_anon,mail_out_auth from domaincounters;
>
> +---------------+---------------+
> | mail_out_anon | mail_out_auth |
> +---------------+---------------+
> | 8 | 58 |
> | 8 | 48 |
> | 4 | 63 |
> | 9 | 53 |
> | 2 | 36 |
> | 0 | 12 |
> | 3 | 2 |
> | 0 | 2 |
> | 0 | 6 |
> | 0 | 2 |
> | 0 | 9 |
> | 0 | 44 |
> | 14 | 63 |
> | 0 | 96 |
> | 7 | 43 |
> | 4 | 61 |
> | 2 | 43 |
> | 2 | 66 |
> | 0 | 86 |
> | 6 | 77 |
> | 6 | 55 |
> | 0 | 63 |
> | 6 | 48 |
> | 2 | 52 |
> +---------------+---------------+
>
> > select mail_out_anon+mail_out_auth as mail_out_total from domaincounters;
>
> +-----------------------------+
> | mail_out_anon+mail_out_auth |
> +-----------------------------+
> | 70 |
> | 56 |
> | 67 |
> | 62 |
This looks wrong: Your query does not match the output you pasted...
>From that query, the column heading would be "mail_out_total", and the
first row would be 66, not 70... Copypasta error perhaps?
Hope this helps...
--
Karl E. Jorgensen
References