Cognizant
American multinational information technology services and consulting company.
4 Rounds
~21 Days
Medium
The Interview Loop
Recruiter Screen (30 min)
Standard fit check, behavioral questions, and resume overview.
Technical Loop (3-4 Rounds)
Deep dive into domain knowledge, coding, and system design.
Interview Question Bank
Backend Engineer
•
Coding
•
easy
Write a SQL query to find the second highest salary of an employee from an Employee table.
#Database
#Queries
Backend Engineer
•
Coding
•
medium
Write a SQL query to find duplicate records in a table based on a specific column, and return the count of duplicates.
#Database
#Group By
#Having
Backend Engineer
•
Technical
•
medium
What is the difference between Clustered and Non-Clustered Indexes in a relational database?
#Database
#Indexing
#Performance
Backend Engineer
•
Technical
•
medium
How do you approach optimizing a slow-running query in PostgreSQL or Oracle?
#Performance Tuning
#Execution Plan
Data Engineer
•
Coding
•
medium
Write a SQL query to find the cumulative sum of sales per day for the current month.
#Window Functions
#Aggregations
#Date Functions
Data Engineer
•
Coding
•
medium
Write a SQL query to delete duplicate rows from a table, keeping only the record with the lowest ID.
#Data Cleaning
#CTEs
#DELETE
Data Engineer
•
Coding
•
easy
Write a SQL query to find all employees who earn more than their direct managers. The table 'Employee' has columns: Id, Name, Salary, ManagerId.
#Self Join
#Filtering
Data Engineer
•
Coding
•
medium
Write a SQL query to find the top 3 highest earning employees in each department, handling ties appropriately.
#Window Functions
#DENSE_RANK
#PARTITION BY
Data Engineer
•
Technical
•
easy
What is the difference between a Left Join and an Inner Join? What happens to the result set if the right table has multiple matching rows for a single row in the left table?
#Joins
#Data Duplication
Data Engineer
•
Technical
•
easy
Explain the difference between ROW_NUMBER(), RANK(), and DENSE_RANK(). In what client reporting scenario would you choose DENSE_RANK over RANK?
#Window Functions
#Data Analysis
Data Scientist
•
Coding
•
medium
Write a SQL query to find the second highest salary within each department from an Employee table. How would you handle ties?
#Window Functions
#DENSE_RANK
#Data Aggregation
Data Scientist
•
Coding
•
medium
For a retail client, we need to calculate the 7-day rolling average of daily sales. Write the SQL query to achieve this.
#Window Functions
#Time Series
#Moving Averages
Data Scientist
•
Coding
•
medium
Given a table of customer transactions, write a query to identify 'churned' customers, defined as those who made a purchase in the last 6 months but not in the last 30 days.
#Filtering
#Date Functions
#Conditional Logic
Data Scientist
•
Technical
•
easy
Explain the difference between RANK, DENSE_RANK, and ROW_NUMBER. Give a business scenario where you would use each.
#Window Functions
#Ranking
Machine Learning Engineer
•
Coding
•
easy
Write a SQL query to find the second highest salary from an Employee table. How would you modify this to find the Nth highest salary?
#SQL
#Subqueries
#Window Functions
Machine Learning Engineer
•
Coding
•
medium
Write a SQL query to calculate a 7-day rolling average of daily sales for a retail client.
#SQL
#Window Functions
#Time Series Data
Product Manager
•
Coding
•
easy
Write a SQL query to find the top 3 most active users by transaction volume in the last 30 days for a fintech application.
#Data Analysis
#SQL
#Product Metrics
Product Manager
•
Coding
•
medium
Write a SQL query to calculate the month-over-month retention rate of users on a subscription platform.
#Retention
#Advanced SQL
#Product Metrics
Software Engineer
•
Technical
•
medium
Write a SQL query to find the nth highest salary from an Employee table.
#SQL Queries
#Subqueries
#Window Functions
Software Engineer
•
Technical
•
medium
Write a SQL query to fetch all employees who are also managers (using a self-join).
#SQL Queries
#Joins
Difficulty Radar
Based on recent AI-sourced data.
Meet Your Interviewers
The "Standard" Interviewer
Senior EngineerFocuses on core competencies, system constraints, and clear communication.
SimulateUnwritten Rules
Think Out Loud
Always explain your thought process before writing code or drawing architecture.