SQL Foundation
Attendees will be able to write basic SQL statements to extract data from databases and be able to specify exactly what data is required and transform it into the shape needed for their business purposes.
Description
Who should attend
People who want to get started learning the basics of SQL and how to use it to extract data from databases. Much of the world’s valuable data is locked away in databases and SQL is the key to unlocking it.
Learning Objectives
Attendees will be able to write basic SQL statements to extract data from databases and be able to specify exactly what data is required and transform it into the shape needed for their business purposes.
Course Content
Introduction to SQL and databases. Why is SQL important?
SQL SELECT Basics. The structure of a simple SELECT statement: the column list, WHERE, ORDER BY and GROUP BY clauses.
- Filter data with the WHERE clause. Use the WHERE clause to get exactly the rows that you require from an (often very large) table.
- Summarise data with the GROUP BY clause and aggregation functions: e.g. COUNT, SUM, AVG.
- Filter aggregated results with the HAVING clause.
- Sort data with the ORDER BY clause
- Create calculated columns
- Join tables to return a dataset that combines data from more than one table.
Some common, useful SQL functions and operations: e.g. ROUND, TRIM. Useful date-related functions (DATEADD, DATEPART, DATEDIFF) and date arithmetic.
Understand the structure of databases: tables (columns, data types, nullability, cardinality, primary keys) and relationships between tables (common columns, foreign keys, referential integrity).
Pre-requisites
None. This is an introduction course.