AI Academy
Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme
Lessons
Reviews
About us
Start
Start learning
Start learning now
My Progress
Courses
University
Quest Map
Lessons
SQL
SQL
Level 10
Conditional Expressions: CASE WHEN ... THEN ... ELSE ... END
SQL SELF
Level 10,
Lesson 0
CASE WHEN expressions in SQL let you do if-else logic right inside your queries: you can classify values, handle NULLs, do calculations, and control how your data shows up. In this lecture, you'll learn how to use CASE to handle all sorts of situations you’ll run into in real tables.
Conditional expressions:
CASE <expression> WHEN ... THEN ... ELSE ... END
SQL SELF
Level 10,
Lesson 1
Simple CASE form in SQL: how to use it as a compact switch-case replacement, for converting codes to text, visualizing statuses, and grouping. Examples, syntax, common mistakes, and comparison with searched CASE.
GREATEST() and LEAST() Functions and NULL
SQL SELF
Level 10,
Lesson 2
Learn how the GREATEST() and LEAST() functions work in PostgreSQL, how they interact with NULL, and how to avoid common mistakes when searching for max and min values in tables.
Real-life NULL Handling Examples: Calculations, Filtering, Sorting
SQL SELF
Level 10,
Lesson 3
In this lecture, you'll learn how to handle NULL values in SQL in practice: sorting, filtering, replacing, and aggregating data with missing values. Real-world examples will help you get how to properly work with NULLs in reports and queries.
Typical mistakes when working with
NULL
SQL SELF
Level 10,
Lesson 4
In this lecture, you'll learn about the most common mistakes when working with
NULL
in SQL: from wrong comparisons and unexpected results from aggregate functions to sorting quirks and foreign key gotchas. Forewarned is forearmed!
Please enable JavaScript to continue using this application.