0% found this document useful (0 votes)
27 views4 pages

SQL Practice Questions Infosys Power Programmer

The document contains a series of SQL practice questions designed for the Infosys Power Programmer interview. It covers various SQL concepts including SELECT statements, JOINs, subqueries, aggregate functions, and performance optimization techniques. Each question aims to test the candidate's understanding and application of SQL in real-world scenarios.

Uploaded by

kholiashivam1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views4 pages

SQL Practice Questions Infosys Power Programmer

The document contains a series of SQL practice questions designed for the Infosys Power Programmer interview. It covers various SQL concepts including SELECT statements, JOINs, subqueries, aggregate functions, and performance optimization techniques. Each question aims to test the candidate's understanding and application of SQL in real-world scenarios.

Uploaded by

kholiashivam1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

SQL Practice Questions for Infosys Power Programmer Interview

Question 1: Basic SELECT

Write a SQL query to fetch all columns from the Employees table.

Question 2: WHERE Clause

Write a query to fetch details of employees whose salary is greater than 50000.

Question 3: ORDER BY

Get the list of employees sorted by their joining date in descending order.

Question 4: GROUP BY

Find the number of employees in each department.

Question 5: HAVING Clause

List departments having more than 10 employees.

Question 6: JOIN

Write a SQL query to get the names of employees along with their department names.

Question 7: INNER JOIN

Fetch employee names and their manager names from an Employee table where each employee

has a manager_id.

Question 8: LEFT JOIN

List all employees and their assigned projects (if any).


SQL Practice Questions for Infosys Power Programmer Interview

Question 9: RIGHT JOIN

List all projects and the employees assigned to them.

Question 10: FULL OUTER JOIN

Show all employees and all projects, regardless of whether an assignment exists.

Question 11: Subqueries

Find employees who earn more than the average salary.

Question 12: Correlated Subquery

Get employees who have the highest salary in their department.

Question 13: IN Operator

Find employees whose IDs are in the list (1, 2, 3, 4).

Question 14: EXISTS

List employees who have at least one project assigned.

Question 15: NOT EXISTS

List departments with no employees.

Question 16: CASE Statement

Write a query to categorize employees based on salary (Low, Medium, High).


SQL Practice Questions for Infosys Power Programmer Interview

Question 17: Aggregate Functions

Find the maximum, minimum, and average salary in the company.

Question 18: Window Functions

Write a query to find the running total of salary partitioned by department.

Question 19: CTE (Common Table Expressions)

Using CTE, find employees whose salary is above the department average.

Question 20: Recursive CTE

Find the employee hierarchy from the top-level manager to the lowest-level worker.

Question 21: Set Operations

Get a list of all employee and contractor names (using UNION).

Question 22: Indexes

How would you improve the performance of a slow-running query?

Question 23: Normalization

Explain 1NF, 2NF, and 3NF with examples.

Question 24: Stored Procedures

What are stored procedures and when would you use them?
SQL Practice Questions for Infosys Power Programmer Interview

Question 25: Triggers

What are triggers in SQL and how do they work?

Question 26: Transactions

Explain ACID properties of a transaction.

Question 27: Isolation Levels

What are the different transaction isolation levels in SQL?

Question 28: SQL Optimization

Tips and techniques for optimizing SQL queries.

Question 29: Real-world Scenario

Write a query to get the top 3 highest paid employees in each department.

You might also like