AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Success stories
Activities
Reviews
Subscriptions
Light theme
Lectures
Reviews
About us
CS50
Start
Start learning
Start learning
My progress
Courses
Quest map
Lectures
SQL
SQL
Level 10
Conditional Expressions: CASE WHEN ... THEN ... ELSE ... END
SQL SELF
10 level,
0 lecture
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
10 level,
1 lecture
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
10 level,
2 lecture
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
10 level,
3 lecture
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
10 level,
4 lecture
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.