Troubleshooting errors | BUS 104 – SQL Exam

There's 3 common errors that students run into when working with SQL:

  • ERROR: not a single-group function
  • ERROR: ambiguous column name
  • ERROR: syntax error

Let's go one-by-one and see how we can correct each!

ERROR: not a single-group function

Simply put, you forgot your GROUP BY statement.

In GROUP BY, we discussed the golden rule of GROUP BY statements:

"Whenever you have field(s) and aggregate function(s) in your SELECT statement, you must include all field(s) in your GROUP BY statement."

So, if you get this error, chances are you didn't write a GROUP BY statement with all the field(s) of your SELECT statement.

For example, if I had the following SQL statement...


This is the end of the preview. To unlock the rest, get the SQL Cram Kit, Lifetime Access or BUS 104 Cram Kit Bundle.

Already purchased? Click here to log in.

Leave a Comment