SQL questions from Accenture data engineering interviews.
These sql questions are sourced from Accenture data engineering interviews. Each includes an expert-level answer. This set leans toward the medium-difficulty band most real interviews actually live in (9 of 12). Recurring themes are sql, window, and partition — these patterns appear most often in real interviews and reward the deepest preparation. Many of these questions also surface at Yash Technologies and Cognizant, 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 12 curated questions: 1 easy, 9 medium, and 2 hard. The distribution skews toward harder problems, reflecting the depth expected in senior-level interviews.
The most frequently tested areas in this set are sql (8), window (4), partition (3), join (3), bigquery (2), and snowflake (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.
Discuss differences between ROW_NUMBER(), RANK(), and DENSE_RANK(), and provide examples from your projects.
Can you explain the difference between OLTP and OLAP?
Describe a time when you had to optimize a slow SQL query. What steps did you take?
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?
SQL query to find the second highest salary from each department.
Triggers in ADF, especially tumbling window triggers.
Get full access to 1,800+ expert answers, AI mock interviews, and personalized progress tracking.