Skip to content
academia.sh

Course Beginner

SQL Fundamentals

By the end of this course

Start course

01

Querying

SQL's language families, the structure of the SELECT statement, condition syntax, sorting and limiting, how null values behave in a query, and built-in functions.

  1. 01 SQL Language Families Definition, manipulation, querying, control, and transaction statements: what each family changes, what declarative syntax means, and setting up the library schema used throughout the course.
  2. 02 SELECT Structure What the column list accepts, aliases, computed expressions, the elimination of duplicate rows, and the difference between the writing order and the evaluation order of clauses.
  3. 03 Conditions Comparison operators, the precedence of logical connectives, range and membership checks, pattern matching with escape characters, and how case-sensitivity behavior depends on the engine.
  4. 04 Sorting and Limiting Sorting the result set, multi-key sorting, collation's effect on order, where null values land, and the standard versus common syntax for limiting the result to the first rows.
  5. 05 Working with Null Values The consequences of three-valued logic in a query, tests for null values, functions that substitute for null values, filling gaps with a conditional expression, and the trap in the negation of a membership condition.
  6. 06 Built-in Functions String, number, and date functions that run per row; the distinction between character and byte length, integer division, and how date functions are the area farthest from the standard.

02

Joins and Aggregation

Inner and outer joins, cross and self joins, aggregate functions, grouping with group-level filtering, and set operations.

  1. 01 Inner Join Gathering information scattered across a normalized schema into a single result, the join condition, table aliases, the way unmatched rows drop out, and how row count can multiply.
  2. 02 Outer Joins Preserving rows that have no match, the way preserved rows fill with null values, the pattern that finds the unmatched, engine support for right and full outer joins, and how the position of a condition changes the result.
  3. 03 Cross and Self Join The Cartesian product an unconditioned join produces, the signs of an accidental product, connecting a table to itself under two aliases, and eliminating duplicate pairs.
  4. 04 Aggregate Functions Reducing a row set to a single value with count, sum, average, and extremum functions; how null values are skipped, the difference between a starred count and a column count, and the result on an empty set.
  5. 05 Grouping and Filtering Splitting rows into sets, producing a summary per group, how a null value forms its own group, the count trap in an outer join, and measuring row filtering against group filtering in the same query.
  6. 06 Set Operations Combining two result sets as a union, intersection, and difference; whether duplicate rows are kept, the equality of null values in set operations, and how operator precedence depends on the engine.

03

Data Manipulation and Definition

Table definition and constraints, the limits of altering a schema and the portable path for rebuilding it, single and bulk row insertion, the consequences of unconditional updates and deletes, view updatability, and object-level authorization.

  1. 01 Creating Tables The parts of a column definition, column-level and table-level constraints, how keys are expressed in a schema, and the error messages a constraint violation produces in the engine.
  2. 02 Altering Schema Adding, renaming, and dropping columns with ALTER TABLE; the engine-dependent limit on what a single statement can change; and the portable procedure for rebuilding a table.
  3. 03 Inserting Rows The column-list and positional forms of the INSERT statement, multiple rows in a single statement, writing a query's result into a table, conflict behavior, and the measured effect of batching inserts inside a transaction.
  4. 04 Updating and Deleting The structure of UPDATE and DELETE statements, what happens when the condition clause is forgotten, reading the number of affected rows, the habit of opening a transaction and rolling back, and how deletion affects related rows.
  5. 05 Views The view as a named query, its two jobs of hiding complexity and narrowing access, the conditions for a view to be updatable, and how writing through a view differs by engine.
  6. 06 Granting and Revoking Privileges The standard SQL syntax for object-level privileges, the grantee-object-privilege triple, the grant option, and the concept of a role; measuring the principle of least privilege against a privilege matrix.

Start typing to search.

↑↓ Esc navigate · open · close