Introduction to SQL

Course Description

Data Query

Using SQL to execute queries against a Relational Database.

  • What is SQL?
  • SQL syntax
    • Code layout
    • Comments
  • Retrieving data using SELECT
    • Grabbing all the fields
    • Selecting specific fields
    • Aliases
  • Selecting specific records
    • Just the first few results
    • WHERE for filtering
    • Logical predicates
    • Matching portions of strings with LIKE
    • Checking for set membership with IN
    • DISTINCT
    • CASE
    • Working with missing (NULL) data
  • Sorting with ORDER BY
  • Aggregation
    • GROUP BY
    • Selected functions for aggregations: MIN, MAX, COUNT, SUM and AVG
    • Filtering after aggregation with HAVING
  • Join
    • Why normalise?
    • INNER JOIN
    • LEFT JOIN, RIGHT JOIN and FULL JOIN

Data Definition

Using SQL to create the structure of a Relational Database.

  • CREATE a database
  • Tables
    • CREATE a table
    • Column types
    • Constraints
      • NOT NULL
      • UNIQUE
      • CHECK
    • Index
    • Primary and Foreign keys
    • Auto increment
    • Default values
  • Cleaning up
    • Dropping a table
    • Dropping a database

Data Manipulation

Using SQL to manipulate data in a Relational Database.

  • INSERT - Putting data into tables
  • UPDATE - Changing existing data
  • DELETE - Removing data

Book now!

Training Philosophy

Our training emphasises practical skills. So, although you'll be learning concepts and theory, you'll see how everything is applied in the real world. We will work through examples and exercises based on real datasets.

Requirements

All you'll need is a computer with a browser and a decent internet connection. We'll be using an online development environment. This means that you can focus on learning and not on solving technical problems.

Of course, we are happy to help you get your local environment set up too! You can start by following these instructions.

Package

The training package includes access to
  • our online development environment and
  • detailed course material (slides and scripts).

Return to our list of courses.