SQL is the one skill both Cognizant clusters share — whether you chose Java/Web UI or Python/Cloud, the technical assessment sets ANSI SQL tasks, and interviewers routinely ask you to write queries live. The classics below appear in memory-based Cognizant papers again and again.
The Cognizant SQL hit-list
- Second highest salary (subquery with MAX)
- Nth highest salary (DENSE_RANK window function)
- Employees earning more than their managers (self-join)
- Duplicate emails (GROUP BY … HAVING)
- Customers who never order (LEFT JOIN … IS NULL / NOT IN)
- Deleting duplicates while keeping the smallest id
Practice Cognizant SQL questions
Each question below is one of those classics in MCQ form — pick the query you would actually run.
Which SQL query reports the second highest salary from the Employee table (returning NULL if it does not exist)?
Which SQL query finds all employees earning more than their managers?
Which SQL query finds all duplicate emails in a Person table?
Do not just recognize the right query — practice typing each one from a blank editor. The interview version of this section is “share your screen and write it”, and hesitation is what costs offers.
Pair SQL with your cluster's coding practice on the coding questions page, and revisit joins/grouping theory before the technical interview.


