Which of the following queries are legal?
Options
- SELECT deptno, count(deptno) FROM emp GROUP BY ename;
- SELECT deptno, count(deptno), job FROM emp GROUP BY deptno;
- SELECT deptno, avg(sal) FROM emp;
- SELECT deptno, avg(sal) FROM emp GROUP BY deptno;
CORRECT ANSWER : SELECT deptno, avg(sal) FROM emp GROUP BY deptno;
Write your comments