SQL Interview Questions With Theory
SQL Interview Questions With Theory
1. Normalization
Normalization is the process of structuring a relational database to reduce data redundancy and improve data
integrity.
3. Index Types
4. Join Example
- LEFT JOIN returns all rows from left table, with NULLs for non-matches
7. View
Example:
CREATE VIEW high_earners AS SELECT name FROM employees WHERE salary > 100000;
SELECT salary FROM (SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk FROM
9. Constraints
Functions that return a single value from a group of rows: SUM(), AVG(), COUNT(), MAX(), MIN()