SQL questions from Cognizant data engineering interviews.
These sql questions are sourced from Cognizant data engineering interviews. Each includes an expert-level answer. This set leans toward the medium-difficulty band most real interviews actually live in (8 of 13). Recurring themes are sql, snowflake, and partition — these patterns appear most often in real interviews and reward the deepest preparation. Many of these questions also surface at Accenture and Yash Technologies, so the preparation transfers across companies. Average answer is around 1 minute of reading — plan roughly 1 hour to work through the full set thoughtfully.
This collection contains 13 curated questions: 3 easy, 8 medium, and 2 hard. There's a strong foundation of fundamentals-focused questions — ideal for building confidence before tackling advanced topics.
The most frequently tested areas in this set are sql (8), snowflake (5), partition (4), window (2), bigquery (2), and join (2). Focusing on these topics will give you the highest return on your preparation time.
Start with the easy questions to warm up and solidify fundamentals. Medium-difficulty questions form the bulk of real interviews — spend the most time here and practice explaining your reasoning out loud. Hard questions often appear in senior and staff-level rounds; attempt them after you're comfortable with the basics. For each question, try answering before revealing the solution. Use our AI Mock Interview to simulate real interview conditions and get instant feedback on your responses.
Write an SQL query to find the second-highest salary from an employee table.
Can you explain the difference between OLTP and OLAP?
Explain the concept of ACID properties in the context of databases.
Explain the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
How do you handle NULL values in SQL? Mention functions like COALESCE and NULLIF.
What is a Common Table Expression (CTE), and when would you use it?
What is the difference between a primary key and a unique key?
What is the difference between WHERE and HAVING clauses in SQL?
Delete vs. Truncate in Snowflake?
Explain Streams and Tasks in Snowflake.
Explain Time Travel in Snowflake.
Solve a coding question related to window functions using SQL and PySpark.
Write a query that ranks users by their total order amount within each region.
Get full access to 1,800+ expert answers, AI mock interviews, and personalized progress tracking.