SQL Questions
- What is a foreign key?
- What is a join? List the different types of joins and explain them
- What is normalization?
- Various forms or normalization?
- What De-normalization?
- When should one or the other be applied?
- What’s the difference between
DELETE
and TRUNCATE
?
- What are the ACID properties (Atomicity, Consistency, Isolation, Durability)
- Atomicity: This property ensures that the transaction is completed in all-or-nothing way.
- Consistency: This ensures that updates made to the database is valid and follows rules and restrictions.
- Isolation: This property ensures integrity of transaction that are visible to all other transactions.
- Durability: This property ensures that the committed transactions are stored permanently in the database.
- What are transactions?
- How do transactions work?
- Can you explain the locks that the database might use to ensure ACID constraints?
Problem Solving Questions
Metabase Interview Credentials
- Write a query that breaks down Orders by product category
Order.Total
- Group By
- Modifier → Add month (this is challenging syntax)
- https://www.postgresqltutorial.com/postgresql-extract/
- `SELECT EXTRACT(MONTH FROM TIMESTAMP '2016-12-31 13:30:15');``
- Write a query that breaks users down by the month they were created and the sum of order value
- How do reviews correlate with order volume?
- Broken down by geography?