These are SQL questions of the kind Cognizant actually asks — the patterns that keep coming back in Cognizant's online tests and technical interview rounds for freshers. My advice: treat this page as a mock test. Attempt every question on paper first, then reveal. If any answer surprises you, the lesson it comes from is linked right below — go read it, then come back.
Cognizant SQL concept questions
What is a Common Table Expression (CTE) in SQL? What is the basic syntax of the WITH clause?
Asked in


What is the difference between CHAR and VARCHAR data types?
Asked in
Cognizant SQL query questions
Write a query to find duplicate records in the students table — rows where the same (name, branch) combination appears more than once — along with how many times each appears.
Asked in
students6 rows
| student_id | name | branch |
|---|---|---|
| 1 | Ravi Kumar | CS |
| 2 | Priya Singh | EC |
| 3 | Ravi Kumar | CS |
| 4 | Aman Gupta | ME |
| 5 | Priya Singh | EC |
| 6 | Ravi Kumar | CS |
How to use this page: Cognizant rarely asks a question you've never seen — they ask standard patterns with a twist. Master the pattern in the SQL course lessons, and the twist stops mattering.
Keep practising: SQL Basics, Joins, GROUP BY & HAVING and Subqueries cover what most Cognizant SQL rounds test — and the Cognizant SQL questions section covers the rest of their selection process.

