SQL
- Basics
-
Queries
- Explain SELECT statement in SQL.
- Explain the use of CASE in SQL.
- How do you calculate the total number of records in a table?
- How do you check if a value exists in a table using SQL?
- How do you filter records in SQL?
- How do you find records that exist in one table but not in another?
- How do you find the second-highest salary in SQL?
- How do you handle duplicate rows in SQL?
- How do you implement pagination in SQL?
- How do you retrieve data in ascending order in SQL?
- How do you retrieve the first N records in SQL?
- How do you retrieve unique values from a column using SQL?
- How do you select rows with a specific condition using HAVING?
- How do you use the LIKE operator in SQL?
- How do you write a SQL query to find all employees who joined in the last 6 months?
- What are aggregate functions in SQL?
- What are aliases in SQL?
- What are recursive queries, and how can they be used?
- What is a CTE (Common Table Expression)?
- What is the difference between UNION and UNION ALL?
- What is the difference between WHERE and HAVING?
- What is the EXISTS clause? How is it different from IN?
- What is the GROUP BY clause used for in SQL?
- What is the ORDER BY clause?
- What is the purpose of the IN operator in SQL?
- What is the use of LIMIT or TOP in SQL?
- What is the use of the BETWEEN operator in SQL?
- What is the use of the DISTINCT keyword in SQL?
- What is the use of the PIVOT clause in SQL?
- What is the WITH clause used for in SQL?
-
Joins
- Explain the CROSS JOIN in SQL.
- Explain the difference between SINGLE JOIN and MULTIPLE JOIN.
- How do you find records that exist in one table but not in another?
- How do you join two tables based on a foreign key?
- How do you perform a full outer join in SQL?
- What is a JOIN in SQL?
- What is a self-join?
- What is the difference between INNER JOIN and LEFT JOIN?
-
Functions
- Explain the use of CASE in SQL.
- How can you use GROUP_CONCAT() function in SQL?
- How do you concatenate two strings in SQL?
- How do you find the second-highest salary in SQL?
- How do you use COALESCE in SQL?
- What does the MOD function do in SQL?
- What is the difference between COUNT and SUM functions?
- What is the difference between COUNT(*) and COUNT(column)?
- Subqueries
-
DML
- Explain the difference between DELETE and TRUNCATE.
- Explain the difference between soft delete and hard delete.
- How do you delete records from a table in SQL?
- How do you insert data into a table in SQL?
- How do you perform bulk inserts in SQL?
- How do you update a record in a table?
- How do you update multiple columns in SQL?
- What are the pros and cons of using triggers in SQL databases?
- What is the difference between DELETE and TRUNCATE?
- What is the difference between DROP and DELETE?
- What is the use of TRIGGER in SQL?
-
DDL
- Explain the difference between DELETE and TRUNCATE.
- How can you add a new column to an existing table?
- How do you convert a column’s data type in SQL?
- How do you create a new table in SQL?
- How do you create a temporary table in SQL?
- How do you enforce referential integrity in SQL?
- How do you remove a table from a database?
- How do you rename a table in SQL?
- What are constraints in SQL?
- What is a surrogate key?
- What is referential integrity in SQL?
- What is the difference between DELETE and TRUNCATE?
- What is the difference between DROP and DELETE?
- DCL/TCL
-
Indexes and Performance
- Explain how indexing can negatively affect performance.
- Explain how to implement indexing strategies for large datasets.
- Explain indexing and how it can improve query performance.
- How can you optimize a SQL query?
- What are the different types of indexes?
- What is a clustered index, and how does it differ from a non-clustered index?
- What is an index?
- Stored Procedures
- Views
- Window Funcions
- Date and Time
- Error Handling
- Best Practices
-
Architecture
- Explain partitioning in SQL databases.
- Explain the difference between snapshot isolation and serializable isolation.
- Explain the difference between soft delete and hard delete.
- How can you design a database schema for high scalability?
- How do you handle large-scale data migrations in SQL?
- How do you implement concurrency in SQL?
- How do you manage large datasets in SQL?
- How do you perform a database migration?
- What are the pros and cons of using triggers in SQL databases?
- What is the difference between vertical and horizontal scaling in databases?
- What is the purpose of database sharding?
- What is the use of the DISTINCT keyword in SQL?
- What is the use of TRIGGER in SQL?
- Data Warehousing
- Distributed Systems
- Replication | Backup | Recovery
- Normalization
- Security
- Common Table Expression (CTE)
-
Performance
- Explain partitioning in SQL databases.
- Explain the NOLOCK hint and when it should be used.
- How do you handle deadlocks in SQL?
- How do you implement concurrency in SQL?
- How do you manage large datasets in SQL?
- How do you monitor performance in SQL databases?
- How do you optimize slow-running queries in SQL?
- How do you perform bulk inserts in SQL?
- What are database locks, and how do they affect queries?
- What is a query optimizer, and how does it work?
- What is query execution plan, and how can you analyze it?
- Modeling
- Admin
- Concurrency
