engineering computer science MCQ #819

What is the result of the SQL query: SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)?

engineering computer science MCQ #819

  1. Question 1

    Q1. What is the result of the SQL query: SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)?

    • A) Employees with above-average salary
    • B) Employees with below-average salary
    • C) All employees
    • D) No employees

    Answer: Employees with above-average salary

    Explanation: The subquery calculates the average salary, and the main query selects employees with salaries above this average.