SQL Interview Prep for Entry-Level Data Analyst
1. Key SQL Topics to Study
Basics:
- SELECT, FROM, WHERE
- Filtering (IN, BETWEEN, LIKE)
- ORDER BY, LIMIT
Joins:
- INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN
Aggregations:
- GROUP BY, HAVING
- COUNT, SUM, AVG, MIN, MAX
Subqueries:
- In SELECT, WHERE, FROM
- Correlated vs Non-correlated
Data Manipulation:
- INSERT, UPDATE, DELETE
Table Design & Relationships:
- Primary Key, Foreign Key
- Normalization: 1NF, 2NF, 3NF
Window Functions:
- ROW_NUMBER(), RANK(), DENSE_RANK()
- PARTITION BY, LEAD(), LAG()
Case Statements:
SQL Interview Prep for Entry-Level Data Analyst
- CASE WHEN THEN ELSE END
String and Date Functions:
- LENGTH(), TRIM(), CONCAT(), UPPER(), LOWER()
- DATE(), NOW(), DATEDIFF(), EXTRACT()
Common Table Expressions:
- WITH statements
2. Practice Questions
Beginner Level:
1. Select specific columns from a table
2. Filter records where salary > 50000
3. Sort employees by join date
4. Find total number of users in a table
5. Group by department and find average salary
Intermediate Level:
6. Find top 3 departments by number of employees
7. Find employees who joined in the last 6 months
8. Join employee and department tables to get employee name and department
9. Find duplicate entries in a column
10. Use a subquery to find users who made above-average purchases
Data Analyst-Oriented Tasks:
11. Calculate running totals by month
12. Find the difference between current and previous month's sales
SQL Interview Prep for Entry-Level Data Analyst
13. Find conversion rate from leads to sales using CASE and aggregates
14. Calculate user retention using JOIN and DATE functions
15. Identify churned users (no activity for 3+ months)