Click here to Skip to main content
15,795,512 members
Articles / Programming Languages / SQL

SQL GROUP By and the "Column 'name' is invalid in the select list because..." error

Rate me:
Please Sign up or sign in to vote.
4.49/5 (19 votes)
2 Jul 2016CPOL2 min read 202.5K   7  
Why do I get an error "Column 'name' is invalid in the select list because t is not contained in either an aggregate function or the GROUP BY clause."? Well, it's pretty simple when you think about what GROUP BY does.


Daily Counts


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Wales Wales
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?

Comments and Discussions