Module 03 of 14

Functions & Expressions

Lessons

About This Module

Real data is rarely in the shape you need. This module covers transforming it inside the query itself, starting with string functions such as CONCAT, SUBSTRING, UPPER/LOWER, TRIM, and REPLACE for cleaning and combining text.

You'll then work with numeric and date functions to calculate, round, and shift values and measure the time between dates, and add decision-making to your queries with the CASE expression. Finally, you'll learn how NULL behaves and how to handle it safely with IS NULL and COALESCE.

Function names vary slightly between databases (MySQL, PostgreSQL, SQL Server), so the lessons mix examples from different systems — the ideas carry over. Work through them in order, then continue on to Aggregation & Grouping.

Lessons

6 videos
01

SQL String Functions Tutorial (LEFT, RIGHT, POSITION, CONCAT, LOWER, REPLACE)

A hands-on tour of the most useful string functions: extracting parts of text, finding positions, combining values, changing case, and replacing characters.

02

Cleaning Strings (SQL) — LEFT, RIGHT, TRIM, UPPER, LOWER, CONCAT

Applying string functions to tidy messy text data: trimming whitespace, standardizing case, and splitting and joining values.

03

SQL Date & Time Functions (Visually Explained)

A visual explanation of working with dates and times in SQL: getting the current date, extracting parts, adding intervals, and finding differences.

04

Date and Time Functions in MySQL (20 Most Important Functions)

A practical MySQL walkthrough of the date and time functions you'll reach for most often, with examples you can run yourself.

05

SQL CASE WHEN Statement (Visually Explained)

How the CASE expression adds if/else logic to a query, with clear visuals showing how each condition is evaluated and how results are labeled.

06

SQL NULL Functions Explained: COALESCE vs IFNULL for Beginners

Why NULL behaves differently from other values, and how COALESCE and IFNULL replace missing data with sensible defaults.