Analytics · Beginner

SQL for Beginners and Data Analysis

Learn SQL from your first SELECT to window functions, data cleaning and a quarterly business review, hands-on in PostgreSQL 16 on a realistic (synthetic) e-commerce database.

About this course

SQL is the language you use to ask questions of data that lives in a relational database. This course teaches it from the ground up on **PostgreSQL 16**, the open-source database used across Ultiblob's own platforms, and it teaches SQL the way analysts actually use it: to answer business questions. You work in a terminal with `psql` against `ultishop`, a synthetic online-retail database with about 2,000 customers, 12,000 orders, 25,000 order lines, payments and support tickets. The data was generated for this course and contains the kinds of flaws real data has: missing e-mails, inconsistent casing, duplicate accounts, impossible dates and payments that do not match their orders. You learn to find those problems and to publish clean views that the rest of your analysis can trust. Across ten lessons you move from `SELECT`, filtering and sorting through calculations, aggregation and joins, then into subqueries, common table expressions and window functions (rankings, running totals, month-over-month change, cohort questions). Two lessons are about working like an analyst: profiling and cleaning data, and turning a question into sanity-checked queries, a CSV export and a written finding. The last lesson covers modifying data safely inside transactions, adding constraints and indexes, and knowing when not to touch a production database. The final project is a quarterly business review: eight business questions about `ultishop` answered with SQL, a CSV export and a one-page findings note, graded against a rubric and automated checks. Every query in the course was executed against PostgreSQL 16.15 and the output you see is the output that was observed.

Content time
13 h
Lessons
10
Lab
Yes
provisioned for you
Certificate
Yes
on completion
Choose a career path

Lesson 1 is free. Enroll in a career path to access its full courses.

Lesson 1 is a free preview — read it without an account.

Analytics — the kind of infrastructure this course is practised on

Outline

Lessons

10 lessons · 13 h
  1. Lesson 1: Databases, tables and your first SELECTFree preview

    Connect to the ultishop database with psql, find your way around its tables and run your first queries.

    45 min
  2. Lesson 2: Filtering, sorting and NULL

    Choose exactly the rows you need with WHERE, understand how NULL behaves, and sort and page through results.

    1 h
  3. Lesson 3: Calculations and functions

    Derive new values from columns with arithmetic, string and date/time functions, casts, COALESCE and CASE.

    1 h 15 min
  4. Lesson 4: Aggregation

    Collapse many rows into counts, sums and averages with aggregate functions, GROUP BY, HAVING, FILTER and ROLLUP.

    1 h 15 min
  5. Lesson 5: Joins

    Combine tables with inner, left, right and full joins, reach across many-to-many relationships, and find missing rows with anti-joins.

    1 h 30 min
  6. Lesson 6: Subqueries and CTEs

    Break a question into steps with scalar, IN and correlated subqueries, derived tables and WITH queries, and know which to reach for.

    1 h 15 min
  7. Lesson 7: Window functions

    Rank rows, compute running totals and moving averages, compare each month with the last and answer cohort questions with OVER.

    1 h 30 min
  8. Lesson 8: Data quality and cleaning in SQL

    Profile the ultishop data for duplicates, inconsistent text and impossible dates, then publish clean, deduplicated views the rest of your work can trust.

    1 h 30 min
  9. Lesson 9: From question to answer, an analysis workflow

    Turn a business question into a defined metric, sanity-checked queries, a CSV export with \copy and a short written finding.

    1 h 30 min
  10. Lesson 10: Modifying data safely and basic modelling

    Insert, update and delete inside transactions on a sandbox copy, add constraints and an index, read an EXPLAIN plan, and know when not to touch production.

    1 h 30 min

Hands-on

Your lab

Real virtual machines on the Ultiblob cluster, reached from your browser. You administer them; we provision and destroy them.

  1. vm-01db01linux

Provisioned for you when you launch the lab from the course. The machines are yours for the access window; release them and launch again whenever you like.

Where it leads

Part of these career paths