Question Bank
SQL & Databases interview questions
A SQL query must remain correct with duplicates, NULL values and unusual relationships between tables. Explain joins and grouping before considering execution cost. Test your reasoning with a small table containing edge cases.
Showing 20 of 72 questions
Explain the differences between GROUP BY and HAVING.
What are indexes and how do they work in PostgreSQL?
Compare ACID and BASE. In what scenarios should each model be used?
When should subqueries be used instead of JOINs?
What is a deadlock and how can it be avoided in transactions?
Explain how ClickHouse works and how it differs from relational databases.
What are indexes in databases and how do they work?
What is a subquery and how does it differ from a regular query?
Explain the difference between HAVING and WHERE in SQL.
How do window functions work in SQL and when should they be used?
Explain what MVCC is and how it works in PostgreSQL.
What is ACID and why is it important for transactions in databases?
Compare SQL and NoSQL databases. In what cases might each be preferable?
Explain the CAP theorem. How does it affect the design of distributed systems?
When does it make sense to use table partitioning in PostgreSQL?
How does replication work in databases and what types are there?
Prepare for your next interview with Vibe Interview.
Download Vibe Interview