Page 1 of 1

group by alias

Posted: Thu 13 Feb 2014 21:29
by devit
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

Re: group by alias

Posted: Fri 14 Feb 2014 14:20
by alexa
This is by design.

These are the column numbers of the query result.

Re: group by alias

Posted: Mon 17 Feb 2014 09:56
by devit
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

Re: group by alias

Posted: Tue 18 Feb 2014 14:25
by alexa
We will reconsider the existing behavior when developing future versions of the product.