Looking for CS 231-G2 - Introduction to databases - Spring 2025 test answers and solutions? Browse our comprehensive collection of verified answers for CS 231-G2 - Introduction to databases - Spring 2025 at lms.musteducation.tn.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What is the purpose of this query?
SELECT Name, CASE WHEN Salary > 10000 THEN 'High' WHEN Salary BETWEEN 5000 AND 10000 THEN 'Medium' ELSE 'Low' END AS SalaryLevel FROM Employees;
What does this query output?
SELECT Department, COUNT(*) FROM Employees GROUP BY Department WITH ROLLUP;
Which query returns names of employees who work in the same department as 'Alice'?
What does this query return?
SELECT Department, AVG(Salary) FROM Employees GROUP BY Department ORDER BY AVG(Salary) DESC;
Which of the following queries returns the second highest salary?
What will this query do?
SELECT Name FROM Employees WHERE ManagerID IS NULL;
What is the role of the alias e in the following query?
SELECT e.Name FROM Employees e WHERE e.Department = 'IT';
Which query returns employees who earn more than the average salary?
1. What does this query return?
SELECT Department, COUNT(*) FROM Employees GROUP BY Department HAVING COUNT(*) > 5;
Which SQL query retrieves the title of an employee with emp_no = 30001?