Zenler Player
Your course is loading. Hang tight.
Writing SQL Queries for Db2
Back to curriculum
0% Complete
0% Complete
Who is this course for?
Who is Greg?
What will I learn in this course?
Overview of lab setup
Module introduction
What is Db2 ?
What SQL does Db2 use ?
Types of SQL statements
What are databases?
Db2 instances and databases
Connecting to Db2
Connecting to PopkornKraze with DBeaver
What is the Db2 CLP ?
Db2-specific help sources
Lab 1: Introduction to querying PostgreSQL
Quiz 1: Introduction to querying PostgreSQL
Module introduction
What are tables ?
Viewing the contents of a table
What are schemas ?
What is PopkornKraze ?
SELECT statements
Using aliases for columns and tables
Quoting (delimiting) names
Using 2-part names
ORDER BY clause
Restricting output with FETCH
Paginating with OFFSET
Removing duplicates with DISTINCT
Querying literals, expressions and functions
Lab 2: Querying a single table
Lab 2: Answers
Quiz 2: Querying a single table
Module introduction
Filtering output with the WHERE clause
Finding patterns with LIKE
Logical operations with AND, OR, and NOT
Logical values withe boolean data type
Ranges of values with the BETWEEN operator
Checking lists of values by using the IN operator
Working with NULL values (the lack of data)
What are user-defined functions?
Lab 3: Filtering the rows to return
Lab 3: Answers
Quiz 3: Filtering the rows to return
Module introduction
Using statement terminators
Working with scripts in DBeaver
Using query history
Copying and saving query results
Commenting code
Formatting your scripts for readability
Quiz 4: Working with queries
Module introduction
What are data types?
Exact numbers
Approximate numbers
Numeric operators
Common numeric functions
Lab 5: Querying numbers
Lab 5: Answers
Quiz 5: Querying numbers
Module introduction
String data types
Literal string values
String operators
Trimming strings with LTRIM, RTRIM, and TRIM
Changing case with UPPER, LOWER
Extracting parts of strings with LEFT, RIGHT, SUBSTRING
Determining the length of strings
Replacing substrings with REPLACE
Replace substrings with OVERLAY
Duplicating strings with LPAD and RPAD
Finding substrings with POSITION
Replacing characters with TRANSLATE
Lab 6: Querying strings
Lab 6: Answers
Quiz 6: Querying strings
Module introduction
Date and time data types
Literal date and time values
Current date and time
Extracting components from date and time values
Adding and subtracting date and time values
Calculating date and time differences
Calculating ages
Get string names for date and time parts
Calculating beginning and end of month
Lab 7: Querying dates and times
Lab 7: Answers
Quiz 7: Querying dates and times
Module introduction
Replacing NULL values with COALESCE
Returning NULL When Equal with NULLIF
Comparing NULL values using IS DISTINCT FROM
Implicit vs explicit conversions
Converting data types with CAST function
Other built-in data types
Lab 8: Converting between data types
Lab 8: Answers
Quiz 8: Converting between data types
Module introduction
Counting rows and columns with COUNT
Summarizing data with SUM, AVG, MIN, MAX
Summarizing data in sections with GROUP BY
Filtering returned groups with HAVING
Understanding logical query execution order
Numbering rows with window functions
Partitioning ranking and numbering with PARTITION BY
Other aggregates
Lab 9: Aggregating data
Lab 9: Answers
Quiz 9: Aggregating data
Module introduction
Lab 10: Implementing logic
Lab 10: Answers
Quiz 10: Implementing logic
Module introduction
Lab 11: Querying multiple tables
Lab 11: Answers
Quiz 11: Querying multiple tables
Module introduction
Lab 12: Applying set operations to tables
Lab 12: Answers
Quiz 12: Applying set operations to tables
Module introduction
Lab 13: Using subqueries
Lab 13: Answers
Quiz 13: Using subqueries
Module introduction
Lab 14: Working with stored procedures and catalog views
Lab 14: Answers
Quiz 14: Working with stored procedures and catalog views
Module introduction
Lab 15: Modifying data
Lab 15: Answers
Quiz 15: Modifying data
Summary and further steps
Module 0: Getting started
Who is this course for?
Preview
Who is Greg?
Preview
What will I learn in this course?
Preview
Overview of lab setup
Module 1: Introduction to querying Db2
Module introduction
What is Db2 ?
What SQL does Db2 use ?
Types of SQL statements
What are databases?
Db2 instances and databases
Connecting to Db2
Connecting to PopkornKraze with DBeaver
What is the Db2 CLP ?
Db2-specific help sources
Lab 1: Introduction to querying PostgreSQL
Quiz 1: Introduction to querying PostgreSQL
Module 2: Querying a single table
Module introduction
What are tables ?
Viewing the contents of a table
What are schemas ?
What is PopkornKraze ?
SELECT statements
Using aliases for columns and tables
Quoting (delimiting) names
Using 2-part names
ORDER BY clause
Restricting output with FETCH
Paginating with OFFSET
Removing duplicates with DISTINCT
Querying literals, expressions and functions
Lab 2: Querying a single table
Lab 2: Answers
Quiz 2: Querying a single table
Module 3: Filtering the rows to return
Module introduction
Filtering output with the WHERE clause
Finding patterns with LIKE
Logical operations with AND, OR, and NOT
Logical values withe boolean data type
Ranges of values with the BETWEEN operator
Checking lists of values by using the IN operator
Working with NULL values (the lack of data)
What are user-defined functions?
Lab 3: Filtering the rows to return
Lab 3: Answers
Quiz 3: Filtering the rows to return
Module 4: Working with queries
Module introduction
Using statement terminators
Working with scripts in DBeaver
Using query history
Copying and saving query results
Commenting code
Formatting your scripts for readability
Quiz 4: Working with queries
Module 5: Querying numbers
Module introduction
What are data types?
Exact numbers
Approximate numbers
Numeric operators
Common numeric functions
Lab 5: Querying numbers
Lab 5: Answers
Quiz 5: Querying numbers
Module 6: Querying strings
Module introduction
String data types
Literal string values
String operators
Trimming strings with LTRIM, RTRIM, and TRIM
Changing case with UPPER, LOWER
Extracting parts of strings with LEFT, RIGHT, SUBSTRING
Determining the length of strings
Replacing substrings with REPLACE
Replace substrings with OVERLAY
Duplicating strings with LPAD and RPAD
Finding substrings with POSITION
Replacing characters with TRANSLATE
Lab 6: Querying strings
Lab 6: Answers
Quiz 6: Querying strings
Module 7: Querying dates and times
Module introduction
Date and time data types
Literal date and time values
Current date and time
Extracting components from date and time values
Adding and subtracting date and time values
Calculating date and time differences
Calculating ages
Get string names for date and time parts
Calculating beginning and end of month
Lab 7: Querying dates and times
Lab 7: Answers
Quiz 7: Querying dates and times
Module 8: Converting between data types
Module introduction
Replacing NULL values with COALESCE
Returning NULL When Equal with NULLIF
Comparing NULL values using IS DISTINCT FROM
Implicit vs explicit conversions
Converting data types with CAST function
Other built-in data types
Lab 8: Converting between data types
Lab 8: Answers
Quiz 8: Converting between data types
Module 9: Aggregating data
Module introduction
Counting rows and columns with COUNT
Summarizing data with SUM, AVG, MIN, MAX
Summarizing data in sections with GROUP BY
Filtering returned groups with HAVING
Understanding logical query execution order
Numbering rows with window functions
Partitioning ranking and numbering with PARTITION BY
Other aggregates
Lab 9: Aggregating data
Lab 9: Answers
Quiz 9: Aggregating data
Module 10: Implementing logic
Module introduction
Lab 10: Implementing logic
Lab 10: Answers
Quiz 10: Implementing logic
Module 11: Querying multiple tables
Module introduction
Lab 11: Querying multiple tables
Lab 11: Answers
Quiz 11: Querying multiple tables
Module 12: Applying set operations to tables
Module introduction
Lab 12: Applying set operations to tables
Lab 12: Answers
Quiz 12: Applying set operations to tables
Module 13: Using subqueries
Module introduction
Lab 13: Using subqueries
Lab 13: Answers
Quiz 13: Using subqueries
Module 14: Working with stored procedures and catalog views
Module introduction
Lab 14: Working with stored procedures and catalog views
Lab 14: Answers
Quiz 14: Working with stored procedures and catalog views
Module 15: Modifying data
Module introduction
Lab 15: Modifying data
Lab 15: Answers
Quiz 15: Modifying data
Module 16: Next steps
Summary and further steps
×
This is an unpublished lesson. This lesson will not be shown for students unless you set it as Public.
Back to Dashboard
No contents are available in this lesson!
No lessons available !
Back to Dashboard
Lesson contents locked
Enroll to unlock this lesson.
Enroll to unlock
Next Lesson