Professional Documents
Culture Documents
No, the query would result in the sql error (in Oracle)
ORA-00933: SQL Command not properly ended
COUNT(*) COUNT(SALARY)
7 6
Why is it so????
AVG (Continued….)
Remember : When we use any of the aggregate functions in SQL
all the columns listed in the SELECT need to be part of the
GROUP BY Clause. In the previous SQL
SELECT student_name,avg(mark)
FROM student,enrolment
WHERE student.student_id=enrolment.student_id
group by student_name;