Reading history
SQL

SQL Tutorial

SQL for beginners: querying, filtering, sorting and grouping data.

Start learning 61 lessons

Lessons

  1. SQL SELECT Statement: WHERE, ORDER BY and GROUP BY
  2. SQL WHERE Clause: Filter Rows With AND, OR, IN, LIKE
  3. SQL ORDER BY, LIMIT, OFFSET and DISTINCT
  4. SQL INSERT, UPDATE and DELETE (With Examples)
  5. SQL Aggregate Functions: COUNT, SUM, AVG, MIN, MAX
  6. SQL GROUP BY and HAVING Explained With Examples
  7. SQL JOINs: INNER JOIN, LEFT JOIN and More
  8. SQL Subqueries: Scalar, IN, EXISTS and Correlated
  9. SQL CREATE TABLE and Constraints (PRIMARY KEY, FOREIGN KEY)
  10. SQL Indexes: CREATE INDEX, Query Plans and Trade-offs
  11. SQL Views: CREATE VIEW, Uses and Limits
  12. SQL NULL Values: IS NULL, COALESCE and NULLIF
  13. SQL CASE Expression (CASE WHEN THEN ELSE END)
  14. SQL String Functions: UPPER, SUBSTR, TRIM, REPLACE and LIKE
  15. SQL Date and Time Functions with Examples
  16. SQL UNION, UNION ALL, INTERSECT and EXCEPT
  17. SQL Common Table Expressions (WITH and Recursive CTE)
  18. SQL Window Functions: ROW_NUMBER, RANK, LAG and Running Totals
  19. SQL Transactions: COMMIT, ROLLBACK, SAVEPOINT and ACID
  20. SQL ALTER TABLE and DROP TABLE (DELETE vs TRUNCATE vs DROP)
  21. Database Normalization: 1NF, 2NF and 3NF Explained
  22. SQL Math Functions: ROUND, CEIL, FLOOR, ABS and MOD
  23. SQL Data Types: INTEGER, DECIMAL, VARCHAR, DATE and CAST
  24. SQL Foreign Keys: ON DELETE CASCADE and SET NULL
  25. Table Relationships: One-to-One, One-to-Many and Many-to-Many
  26. SQL UPSERT: INSERT ON CONFLICT DO UPDATE
  27. How to Find and Delete Duplicate Rows in SQL
  28. SQL Triggers: BEFORE and AFTER with Examples
  29. SQL JSON Functions: Query JSON Data with Examples
  30. SQL Pagination: LIMIT/OFFSET vs Keyset Pagination
  31. SQL Interview Questions with Answers and Examples
  32. SQL GROUP_CONCAT and STRING_AGG: Combine Rows Into a String
  33. SQL UPDATE and DELETE With JOIN: Changing Rows From Another Table
  34. Hierarchical Data in SQL: Trees and Recursive Queries
  35. Gaps and Islands in SQL: Missing Numbers and Streaks
  36. Median, Percentiles and NTILE in SQL
  37. Fill Missing Dates in SQL Reports With a Calendar
  38. Full-Text Search in SQL With SQLite FTS5
  39. SQL Injection and Parameterized Queries Explained
  40. SQL Query Optimization: Query Plans and Index-Friendly Queries
  41. SQL Project: Sales Analysis Report for an Online Shop
  42. SQL EXISTS and NOT EXISTS: Semi-Joins and Anti-Joins
  43. SQL LAG and LEAD: Compare Rows
  44. Running Totals and Moving Averages in SQL
  45. Top N Per Group in SQL
  46. Pivot Rows to Columns in SQL
  47. SQL LIKE and Pattern Matching
  48. SQL CAST and Type Conversion
  49. Cohort and Retention Analysis in SQL
  50. Data Quality Checks in SQL
  51. SQL Project: Library Database
  52. SQL Self Join
  53. SQL CROSS JOIN and Calendar Tables
  54. SQL Auto-Increment IDs and Sequences
  55. SQL Generated Columns
  56. SQL CREATE TABLE AS SELECT and Temporary Tables
  57. SQL Percent of Total and Ratios
  58. SQL Date Range Overlaps
  59. SQL Funnel Analysis
  60. SQL Soft Delete and Audit Columns
  61. SQL Project: Hospital Appointments Database