14 Days Roadmap to learn SQL
𝗗𝗮𝘆 𝟭: 𝗜𝗻𝘁𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻 𝘁𝗼 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲𝘀 𝗮𝗻𝗱 𝗦𝗤𝗟
Topics to Cover:
- What is SQL?
- Different types of databases (Relational vs. Non-Relational)
- SQL vs. NoSQL
- Overview of SQL syntax
Practice:
- Install a SQL database (e.g., MySQL, PostgreSQL, SQLite)
- Explore an online SQL editor like SQLFiddle or DB Fiddle
𝗗𝗮𝘆 𝟮: 𝗕𝗮𝘀𝗶𝗰 𝗦𝗤𝗟 𝗤𝘂𝗲𝗿𝗶𝗲𝘀
Topics to Cover:
- SELECT statement
- Filtering with WHERE clause
- DISTINCT keyword
Practice:
- Write simple SELECT queries to retrieve data from single table
- Filter records using WHERE clauses
𝗗𝗮𝘆 𝟯: 𝗦𝗼𝗿𝘁𝗶𝗻𝗴 𝗮𝗻𝗱 𝗙𝗶𝗹𝘁𝗲𝗿𝗶𝗻𝗴
Topics to Cover:
- ORDER BY clause
- Using LIMIT/OFFSET for pagination
- Comparison and logical operators
Practice:
- Sort data with ORDER BY
- Apply filtering with multiple conditions use AND/OR
𝗗𝗮𝘆 𝟰: 𝗦𝗤𝗟 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 𝗮𝗻𝗱 𝗔𝗴𝗴𝗿𝗲𝗴𝗮𝘁𝗶𝗼𝗻𝘀
Topics to Cover:
- Aggregate functions (COUNT, SUM, AVG, MIN, MAX)
- GROUP BY and HAVING clauses
Practice:
- Perform aggregation on dataset
- Group data and filter groups using HAVING
𝗗𝗮𝘆 𝟱: 𝗪𝗼𝗿𝗸𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗠𝘂𝗹𝘁𝗶𝗽𝗹𝗲 𝗧𝗮𝗯𝗹𝗲𝘀 - 𝗝𝗼𝗶𝗻𝘀
Topics to Cover:
- Introduction to Joins (INNER, LEFT, RIGHT, FULL)
- CROSS JOIN and self-joins
Practice:
- Write queries using different types of JOINs to combine data from multiple table
𝗗𝗮𝘆 𝟲: 𝗦𝘂𝗯𝗾𝘂𝗲𝗿𝗶𝗲𝘀 𝗮𝗻𝗱 𝗡𝗲𝘀𝘁𝗲𝗱 𝗤𝘂𝗲𝗿𝗶𝗲𝘀
Topics to Cover:
- Subqueries in SELECT, WHERE, and FROM clauses
- Correlated subqueries
Practice:
- Write subqueries to filter, aggregate, an select data
𝗗𝗮𝘆 𝟳: 𝗗𝗮𝘁𝗮 𝗠𝗼𝗱𝗲𝗹𝗹𝗶𝗻𝗴 𝗮𝗻𝗱 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲 𝗗𝗲𝘀𝗶𝗴𝗻
Topics to Cover:
- Understanding ERD (Entity Relationship Diagram)
- Normalization (1NF, 2NF, 3NF)
- Primary and Foreign Key
Practice:
- Design a simple database schema and implement it in your database
𝗗𝗮𝘆 𝟴: 𝗠𝗼𝗱𝗶𝗳𝘆𝗶𝗻𝗴 𝗗𝗮𝘁𝗮 - 𝗜𝗡𝗦𝗘𝗥𝗧, 𝗨𝗣𝗗𝗔𝗧𝗘, 𝗗𝗘𝗟𝗘𝗧𝗘
Topics to Cover:
- INSERT INTO statement
- UPDATE and DELETE statement
- Transactions and rollback
Practice:
- Insert, update, and delete records in a table
- Practice transactions with COMMIT and ROLLBACK
𝗗𝗮𝘆 𝟵: 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗤𝗟 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀
Topics to Cover:
- String functions (CONCAT, SUBSTR, etc.)
- Date functions (NOW, DATEADD, DATEDIFF)
- CASE statement
Practice:
- Use string and date function in queries
- Write conditional logic using CASE
𝗗𝗮𝘆 𝟭𝟬: 𝗩𝗶𝗲𝘄𝘀 𝗮𝗻𝗱 𝗜𝗻𝗱𝗲𝘅𝗲𝘀
Topics to Cover:
- Creating and using Views
- Indexes: What they are and how they work
- Pros and cons of using indexes
Practice:
- Create and query views
- Explore how indexes affect query performance
Here you can find essential SQL Interview Resources👇
https://topmate.io/analyst/864764Like this post if you need more 👍❤️
Hope it helps :)