Learn SQL from basics to advanced queries with practical examples, exercises, interview questions and projects.
Databases, tables, data types and the core DDL/DML commands.
SELECT, filtering, sorting and combining result sets with set operators.
String, numeric, date and aggregate functions with GROUP BY / HAVING.
INNER, LEFT, RIGHT, FULL, CROSS and SELF joins explained with sample tables.
Nested queries — scalar, correlated, and when to use a subquery vs a join.
Common Table Expressions and recursive queries with business examples.
ROW_NUMBER, RANK, LAG, LEAD and analytics-style ranking queries.
Keys, constraints, normalization (1NF–BCNF) and ER modelling.
Indexing strategy, reading query plans and performance tuning.
ACID properties, COMMIT/ROLLBACK, isolation levels and deadlocks.
Views, stored procedures, triggers, temp tables and cursors.
Topic-wise SQL interview questions with explained answers.
Beginner to advanced problem sets on realistic datasets.
End-to-end database schemas — e-commerce, banking, HR and more.
No notes found. Try a different search term, or browse all SQL notes.
What SQL actually is, what it does, and why it matters for analysts and developers.
What a relational database is, and how MySQL, PostgreSQL, SQL Server and others compare.
How relational (SQL) and non-relational (NoSQL) databases differ, and when to use each.
The standard clause order every SQL query follows, and how execution order really works.
How to write -- and /* */ comments in SQL, plus the MySQL-only # syntax.
The major SQL data type categories and how they differ across MySQL, PostgreSQL and SQL Server.
How to create a new SQL database, with syntax and dialect notes.
How to define a new table with columns, data types and constraints.
How to add, modify, rename and drop columns on an existing table.
How to permanently delete a table, and when to use it instead of TRUNCATE or DELETE.
How TRUNCATE instantly clears a table, and exactly how it differs from DELETE.
How to add new rows to a table — single row, multiple rows, and INSERT...SELECT.
How to modify existing rows safely — and why the WHERE clause is critical.
How to remove specific rows from a table, and how DELETE compares to TRUNCATE and DROP.
The most-used SQL statement — retrieving columns from a table.
How to remove duplicate rows from a result set using DISTINCT.
How to filter rows with WHERE, and the comparison operators available.
Combining multiple conditions in WHERE, and why parentheses matter.
Reversing a condition with NOT, including its behavior with NULL values.
Matching a value against a list, and using IN with a subquery.
Filtering values within an inclusive range, including the datetime gotcha.
Pattern matching with % and _ wildcards for partial text search.
Testing for missing values correctly — why = NULL never works.
Sorting query results, including multi-column sorts.
Restricting row count for top-N results and pagination.
Renaming columns and tables for readability with AS.
Adding if/else logic to a query, and the CASE + SUM pivot pattern.
An overview of all six SQL join types, with a shared reference dataset used across this section.
Returning only rows that match in both tables — syntax, example, and common mistakes.
Keeping every row from the left table, and the LEFT JOIN + IS NULL pattern for finding unmatched rows.
Keeping every row from the right table — the mirror image of LEFT JOIN.
Keeping every row from both tables, and how to simulate it in MySQL.
Producing every combination of two tables — the Cartesian product.
Joining a table to itself for hierarchical data like employees and managers.
The core difference, and how to decide which join type a report actually needs.
Why they're mirror images of each other, and why LEFT JOIN is the common convention.
Chaining three or more joins together to build real, multi-table reports.
Join CodingNow's Data Analytics / Data Science course — live mentorship, hands-on projects, and 100% placement support in Delhi NCR.
Enroll Now — Free Demo Available
Insights on AI, Data Science, Full Stack & Career
ompanies are slowly shifting away from degree-based hiring to skills-first hiring. In 2026, many MNC…
Read More →
How to Prepare for HR Interviews – The Complete Guide HR interviews test communication, cultura…
Read More →Your portfolio isn't a gallery—it's a pitch. Show 3–6 strong projects with live demos, clean Git…
Read More →