So far I have written Aggregate function followed by Group By clause to find the values based on SUM, AVG and other Aggregate functions. I have a bit confusion in the Group
You must group by columns that do not have aggregate functions on them.
You may avoid a group by clause if all columns selected have aggregate functions applied.