Module 2: Shaping and Transforming Data
Data in its raw form is rarely ready for reporting or analysis. In this module, you will learn how to use SQL’s powerful built-in functions to transform, clean, and reshape your data directly within your queries.
Learning Objectives
Section titled “Learning Objectives”In this module, you will:
- Implement “If-Then” logic in SQL using the
CASEstatement. - Clean and manipulate text data using string functions.
- Master date and time arithmetic and extraction.
- Convert data between types (e.g., String to Integer) using
CAST. - Effectively manage missing data using
COALESCEandNULLIF.
Chapters
Section titled “Chapters” 2.1 Conditional Logic Using the CASE statement for dynamic row-level logic.
2.2 String Manipulation Functions for cleaning and extracting text: SUBSTRING, REPLACE, and more.
2.3 Date and Time Functions Performing calculations and extracting parts from timestamps.
2.4 Type Conversion Explicitly casting data types and handling implicit conversions.
2.5 Handling Missing Values Using COALESCE and NULLIF to manage NULLs effectively.