group by alias

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
devit
Posts: 2
Joined: Thu 13 Feb 2014 21:17

group by alias

Post by devit » Thu 13 Feb 2014 21:29

Hi I have a simple query as below, when I go to the group by tab it shows the alias as selectable but when I select it, it shows as a numeric value. Am I doing something wrong here?

Thanks in advance.

Image

SELECT
`billing_data`.`start_gmt_datetime` AS `start_gmt_datetime`,
MONTHNAME(start_gmt_datetime) AS `month`,
YEAR(start_gmt_datetime) AS `year`,
sum(kwh_used) AS `month_total`
FROM `billing_data`
WHERE `member_account_no` = 'SE0033284'
GROUP BY `month`, `year`
ORDER BY `start_gmt_datetime` ASC

alexa

Re: group by alias

Post by alexa » Fri 14 Feb 2014 14:20

This is by design.

These are the column numbers of the query result.

devit
Posts: 2
Joined: Thu 13 Feb 2014 21:17

Re: group by alias

Post by devit » Mon 17 Feb 2014 09:56

Okay, but when I select them ( from the selection side )they say month, year so for constancy maybe they should say the same on the selected side and not go to a non descriptive numeric value

alexa

Re: group by alias

Post by alexa » Tue 18 Feb 2014 14:25

We will reconsider the existing behavior when developing future versions of the product.

Post Reply