You are viewing a single comment's thread. Return to all comments →
Because he has selected both hacker_id and name. (select sub.hacker_id, hak.name). If he were not to group by name as well, then it would be an error unless you use max(name) while selecting. See Reason for Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause [duplicate]https://stackoverflow.com/a/13999903/3370168
Seems like cookies are disabled on this browser, please enable them to open this website
Top Competitors
You are viewing a single comment's thread. Return to all comments →
Because he has selected both hacker_id and name. (select sub.hacker_id, hak.name). If he were not to group by name as well, then it would be an error unless you use max(name) while selecting. See Reason for Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause [duplicate]https://stackoverflow.com/a/13999903/3370168