SQL (Structured Query Language) is one of the most frequently asked topics in campus placements and technical interviews. Whether you’re a fresher or someone looking to break into the tech industry, practicing SQL query questions for placement is a crucial step in your preparation.
In this post, we’ll cover 15 commonly asked SQL query questions for placement with real-life examples and answers to help you understand how to approach them effectively.
🚀 Why SQL is Important for Placements?
Almost every IT role—be it Data Analyst, Backend Developer, or Software Engineer—requires basic to intermediate knowledge of SQL. Interviewers often test:
- Data retrieval skills
- Aggregation and filtering
- Joins and subqueries
- Real-world problem-solving using SQL
📚 SQL Query Questions for Placement (With Solutions)
Let’s dive into some practical and frequently asked SQL query questions for placement.
🔹 1. Find all employees with a salary greater than 50,000.
SELECT * FROM Employees
WHERE Salary > 50000;
🔹 2. Get the total number of employees in each department.
SELECT Department, COUNT(*) AS EmployeeCount
FROM Employees
GROUP BY Department;
🔹 3. List employees who joined in the year 2023.
SELECT * FROM Employees
WHERE YEAR(JoiningDate) = 2023;
🔹 4. Find the highest-paid employee.
SELECT * FROM Employees
ORDER BY Salary DESC
LIMIT 1;
🔹 5. Display department-wise average salary.
SELECT Department, AVG(Salary) AS AverageSalary
FROM Employees
GROUP BY Department;
🔹 6. List employees with names starting with ‘A’.
SELECT * FROM Employees
WHERE Name LIKE 'A%';
🔹 7. Retrieve employees from departments ‘IT’ and ‘HR’.
SELECT * FROM Employees
WHERE Department IN ('IT', 'HR');
🔹 8. Find employees who haven’t received any bonus.
SELECT * FROM Employees
WHERE Bonus IS NULL;
🔹 9. Get second highest salary.
SELECT MAX(Salary) AS SecondHighest
FROM Employees
WHERE Salary < (SELECT MAX(Salary) FROM Employees);
🔹 10. List employees with the same salary.
SELECT Salary
FROM Employees
GROUP BY Salary
HAVING COUNT(*) > 1;
🔹 11. Find employees who joined in the last 6 months.
SELECT * FROM Employees
WHERE JoiningDate >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH);
🔹 12. Retrieve the top 3 earning departments.
SELECT Department, SUM(Salary) AS TotalSalary
FROM Employees
GROUP BY Department
ORDER BY TotalSalary DESC
LIMIT 3;
🔹 13. Write a query to fetch duplicate employee names.
SELECT Name, COUNT(*) AS count
FROM Employees
GROUP BY Name
HAVING COUNT(*) > 1;
🔹 14. Find the youngest employee.
SELECT * FROM Employees
ORDER BY DOB DESC
LIMIT 1;
🔹 15. Count number of employees who joined in each month.
SELECT MONTH(JoiningDate) AS Month, COUNT(*) AS EmployeeCount
FROM Employees
GROUP BY MONTH(JoiningDate);
🎯 Tips to Crack SQL Placement Questions
- Understand basics thoroughly: SELECT, WHERE, GROUP BY, ORDER BY, JOIN.
- Practice common query patterns like finding duplicates, max/min, second highest.
- Revise real-world scenarios like salary, attendance, and department-based questions.
- Use online SQL practice platforms like LeetCode, HackerRank, or W3Schools.
- Time yourself during practice – this mimics the actual placement test pressure.
❓ FAQs – SQL Query Questions for Placement
Q1: What kind of SQL questions are asked in placement rounds?
You’ll usually get 10–15 questions, including basic SELECT queries, GROUP BY, HAVING, joins, and subqueries.
Q2: Which companies ask SQL questions in placements?
Most tech companies like TCS, Wipro, Infosys, Cognizant, Capgemini, and Accenture test SQL.
Q3: Is SQL important for non-CS students in placements?
Absolutely! If you’re applying for data roles or backend positions, SQL knowledge gives you a competitive edge.
🔚 Final Thoughts
Mastering SQL query questions for placement is a game-changer. It not only boosts your confidence but also enhances your problem-solving ability during technical rounds. Make sure you practice regularly, understand the logic behind each query, and simulate test-like environments to get interview-ready.
Keep learning, and you’ll crack your placement with ease!