DataGrip
 
Get DataGrip
You are viewing the documentation for an earlier version of DataGrip.

Code Inspection: Column should be in group by clause

Last modified: 13 May 2022

Reports columns that are not in the GROUP BY clause or inside an aggregate function call.

Example (Microsoft SQL Server):

If you run the SELECT query, you will receive an error because Microsoft SQL Server expects the b column in GROUP BY or used inside an aggregate function. The following two examples will fix the error.