SQL CASE Expression
Learn SQL CASE WHEN step by step: searched and simple CASE, labels, CASE in ORDER BY, conditional counts and pivots with SUM(CASE), on real MySQL data.
Online Learning Platform
Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.
Learn SQL CASE WHEN step by step: searched and simple CASE, labels, CASE in ORDER BY, conditional counts and pivots with SUM(CASE), on real MySQL data.
Understand NULL in SQL: IS NULL and IS NOT NULL, why = NULL never matches, NULL in arithmetic, COUNT and sorting, and the NULL-safe operator.
Rename columns and tables in SQL with aliases (AS): readable headers, short table names in joins, aliases with spaces, and where an alias can be used.
Filter SQL rows with IN and BETWEEN: lists of values, number and date ranges, NOT IN, NOT BETWEEN, the inclusive ends of BETWEEN and the NOT IN NULL…
BeginnerLesson 14 of 699 min read8 queries run on MySQL 8.4= only finds exact matches. LIKE finds patterns: names that start with "A", emails at a…
Sort SQL results with ORDER BY: ascending and descending, multiple columns, expressions and aliases, NULL ordering and custom sort orders, in MySQL.
Use SQL LIMIT and OFFSET to return the top N rows, paginate results and find the Nth highest salary, with MySQL examples and the pitfalls of large offsets.
Learn the SQL WHERE clause step by step: filter rows with =, , >, =, <=, text and date conditions, and avoid common mistakes, with real MySQL output.
Combine conditions in SQL with AND, OR and NOT. Learn operator precedence, why parentheses matter, and how NULL behaves in logic, with real MySQL results.
Learn SQL SELECT DISTINCT with examples: unique values from one column, distinct combinations of columns, COUNT(DISTINCT) and how DISTINCT treats NULL.
MySQL data types with examples: INT, DECIMAL vs FLOAT, CHAR vs VARCHAR, TEXT, ENUM, DATE, DATETIME, TIMESTAMP, BOOLEAN and JSON, and how to choose.
The free company sample database used in this SQL tutorial: employees, departments, customers, products and orders. See every table and copy the MySQL script.
Take free timed mock tests with answers and explanations.