Consider the below two tables in the Image for reference while trying to create queries for the questions asked here.
SQL Query to fetch records that are present in one table but not in another table.
SQL query to fetch all the employees who are not working on any project.
SQL query to fetch all the Employees from EmployeeDetails who joined in the Year 2020.
Fetch all employees from EmployeeDetails who have a salary record in EmployeeSalary.
Write an SQL query to fetch project-wise count of employees.
Fetch employee names and salary even if the salary value is not present for the employee.
Write an SQL query to fetch all the Employees who are also managers.
Write an SQL query to fetch duplicate records from EmployeeDetails.
For complete list of 40 questions with answers, you can see https://artoftesting.com/sql-queries-for-interview