Practice Questions
1. Retrieve all records from a table named Employees.
2. Get the distinct departments from the Employees table.
3. Count the total number of employees in the Employees table.
4. Retrieve all employees whose salary is greater than 50,000.
5. List names of employees whose name starts with 'A'.
6. Fetch the top 5 highest-paid employees.
7. Retrieve employees who do not have a manager (i.e., NULL in manager_id).
8. Show all columns from Employees where hire_date is in 2024.
9. Fetch records where department_id is either 10, 20, or 30.
10. Get the total salary paid to all employees.
11. Fetch employee names along with their department names (use Employees and
Departments tables).
12. List all employees and their manager names.
13. Show employees who work in the same department as 'John'.
14. Get a list of employees and their project names using a many-to-many relationship
(via EmployeeProjects table).
15. Write a query to display employees with no assigned project.