can use more than 1 column in MySQL Group BY?
Posted
by Am1rr3zA
on Stack Overflow
See other posts from Stack Overflow
or by Am1rr3zA
Published on 2010-05-01T15:02:44Z
Indexed on
2010/05/01
15:07 UTC
Read the original article
Hit count: 268
Hi,
I want write these SQL Query:
CREATE VIEW `uniaverage` AS select `averagegrade`.`mjr`,`averagegrade`.`lev` , avg(`averagegrade`.`average`) AS `uniAVG` from `averagegrade` group by `averagegrade`.`lev`, `averagegrade`.`mjr`;
But MySQL Query Browser give this error:
Operand Should Contain 1 column(s)
I somewhere read can use group by on more than 1 column!!! How can I solve this error? or how can I change the Query to get the same result?
© Stack Overflow or respective owner