12th Class Computers Science Sample Paper Cyber Olympiad Sample Paper-4

  • question_answer
    Which of the following SQL code is CORRECT, if you want to show the average salary for all the departments with more than 2 people for a job from the table named emp?

    A) Select AVG (sal) from emp GROUP BY deptno HAVING COUNT (empno)\[>2;\]

    B) Select AVG (sal) from emp where COUNT>2;

    C) Select AVG (sal) from emp GROUP BY (empno) where COUNT \[>2;\]

    D) Select AVG (sal) from emp GROUP BY (empno) AND COUNT\[>2;\]

    Correct Answer: A


You need to login to perform this action.
You will be redirected in 3 sec spinner