Date Functions in SQL: Extract, Add and Subtract Dates…

Date functions in SQL with examples: get the month or year, add days, find the gap between two dates, group by month, and the...
SkilloVilla Team
9 min read

How to Delete Duplicate Rows in SQL (and Keep…

How to delete duplicate rows in SQL: find them with GROUP BY, keep the first or latest copy with MIN or ROW_NUMBER, fix MySQL...
SkilloVilla Team
8 min read

CASE WHEN in SQL: The CASE Statement With Examples

The CASE statement in SQL explained: simple and searched CASE WHEN syntax, bucketing, NULL handling, CASE in GROUP BY, ORDER BY and UPDATE, with...
SkilloVilla Team
7 min read

Normalization in SQL: 1NF, 2NF and 3NF Explained With…

Normalization in SQL explained: 1NF, 2NF, 3NF and BCNF worked through one real order sheet, the anomalies they prevent, and when to denormalize.
SkilloVilla Team
7 min read

Subqueries and Nested Queries in SQL, With Examples

Nested queries in SQL explained: subqueries in WHERE, FROM and SELECT, correlated subqueries, EXISTS vs IN, and the NOT IN NULL trap, with examples.
SkilloVilla Team
8 min read

Views in SQL: How to Create, Use and Update…

Views in SQL explained: what a view is, CREATE VIEW syntax, updatable and materialized views, and view vs table, with worked examples.
SkilloVilla Team
8 min read

Primary Key, Foreign Key and Constraints in SQL, With…

Primary key and foreign key in SQL explained with examples: how they link tables, composite keys, ON DELETE CASCADE, and UNIQUE, CHECK and NOT...
SkilloVilla Team
6 min read

GROUP BY and HAVING in SQL, With Examples

GROUP BY in SQL explained with examples: grouping by one or more columns, HAVING vs WHERE, the order SQL runs a query in, and...
SkilloVilla Team
6 min read

CTE in SQL: The WITH Clause Explained With Examples

CTE in SQL explained: what a common table expression is, WITH clause syntax, chained CTEs, recursive CTEs, and CTE vs subquery, with worked examples.
SkilloVilla Team
6 min read

SQL Aggregate Functions: COUNT, SUM, AVG, MIN and MAX…

SQL aggregate functions explained with examples: COUNT, SUM, AVG, MIN and MAX, how they treat NULL, COUNT DISTINCT, and conditional aggregation.
SkilloVilla Team
6 min read