Click here to Skip to main content
15,886,052 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 217.6K   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.

Views

Daily Counts

License

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


Written By
CEO
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