SQL questions from Cognizant data engineering interviews.
These sql questions are sourced from Cognizant data engineering interviews. Each includes an expert-level answer.
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.
Download the complete interview prep bundle with expert answers. Study offline, on your commute, anywhere.