Write five SQL queries.
1Times asked
Jun 2026Last seen
Jun 2026First seen
💡 Model Answer
- Retrieve all columns from the Employees table:
SELECT * FROM Employees;
- Get employee names and salaries where salary exceeds 50,000:
SELECT Name, Salary FROM Employees WHERE Salary > 50000;
- Count employees per department:
SELECT DepartmentID, COUNT(*) AS EmployeeCount FROM Employees GROUP BY DepartmentID;
- Join Employees with Departments to show employee name and department name:
SELECT e.Name, d.DepartmentName
FROM Employees e
JOIN Departments d ON e.DepartmentID = d.ID;
- Find employees hired after January 1, 2023:
SELECT Name, HireDate FROM Employees WHERE HireDate > '2023-01-01';
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.
Get Assisting AI — Starts at ₹500