Data Academy

Every lesson is hands-on: you type each query yourself, against a real business database. New to the workflow? Start with the Quick Setup & Load Northwind Datasets guide — it shows you how to connect with CloudBeaver and how to run the koans.

Hands-on — practice is king — DataPallasPRACTICE IS KINGDATAPALLASHANDS-ON

🧮 Learn SQL

You type every query yourself, against a real business database — from your first SELECT to window functions, CTEs and query tuning. Every lesson ships with runnable koans.

14 lessons

  1. 01

    Start Here: The SQL Thinking Loop — Your First Query, CloudBeaver & the Koans

    The fastest way to learn SQL is to write it. You answer a real business question in your first few minutes, learn the loop you'll use every time, and meet the tools you'll practise with: Northwind on PostgreSQL, CloudBeaver, DuckDB and the koans.

    #sql#fundamentals#getting-started
  2. 02

    SELECT & Column Lists — Fetching a Table's Data

    Open a database you have never seen and find out what is in it. Ask a table for everything, then ask it for exactly the columns you want, and read what the database says each column is made of.

    #sql#fundamentals#select
  3. 03

    Data Types — What a Column Can Hold, and Why Results Surprise You

    Every column has a type, and whoever built the table chose it. Learn to ask any database what it is holding, meet the five families you will actually use, and see why a comparison can hand you an answer that looks right and is not.

    #sql#fundamentals#data-types
  4. 04

    WHERE, AND/OR/NOT, IN, BETWEEN — Keeping Only the Rows You Need

    Ask a question and get back only the rows that answer it. One test with =, combined tests with AND and OR (and the parentheses trap between them), lists with IN, ranges with BETWEEN, and the date habit that never miscounts a month.

    #sql#fundamentals#where#filtering
  5. 05

    ORDER BY, LIMIT & FETCH FIRST — Sorting Rows and Keeping the Top Few

    Every request that says top, latest, biggest or worst is a sort and a cut. Learn to put rows in the order you want, keep only the few you need, and see why the same query can hand two people different answers.

    #sql#fundamentals#order-by#limit
  6. 06

    Aliases, Expressions & DISTINCT — Make Messy Output Look Like a Report

    A correct query is only half the job. Name your columns, build the ones the table hasn't got, round money back into money — and learn why a DISTINCT list stops being distinct the moment you add a column to it.

    #sql#fundamentals#alias#distinct#expressions
  7. 07

    Aggregate Functions: COUNT, SUM, AVG, MIN, MAX — Turning Many Rows Into One Number

    How many, how much, the biggest, the smallest, the average. Learn the five functions that collapse a table into a single number — and the two invisible things that decide which rows that number is actually about.

    #sql#fundamentals#aggregate-functions#count
  8. 08

    GROUP BY — One Number per Customer, per Month, per Anything

    An aggregate gives you one number for a whole table, and nobody ever asks for that. Learn to get one number per group — and why the columns you group by decide what one row of your report actually means.

    #sql#fundamentals#group-by#aggregates
  9. 09

    HAVING vs WHERE — Filtering Groups and Filtering Rows

    You can build a total. Now keep only the groups you want. Learn what HAVING does, the order a database really runs your query in, and why putting a filter one clause too early gives you a wrong answer that proves itself right.

    #sql#fundamentals#having#group-by
  10. 10

    JOINs: INNER, LEFT, RIGHT, FULL — Combining Rows From Two Tables

    The data you need is almost never in one table. Learn to match rows across two tables with JOIN and ON, keep the rows that match nothing, and see why moving one condition from ON into WHERE silently undoes a LEFT JOIN.

    #sql#fundamentals#joins#left-join
  11. 11

    NULL & Three-Valued Logic — How Missing Values Change Your Results

    An empty cell is not a value, so comparing it to one answers neither yes nor no. Learn why = NULL matches nothing, why a filter and its opposite do not add up, and the two places a missing value quietly changes a number you were about to send someone.

    #sql#fundamentals#null#three-valued-logic#coalesce
  12. 12

    SELECT + JOIN + GROUP BY — Building Your First Real Report

    Build a top 10 customers report with SELECT, JOIN, GROUP BY, SUM, ORDER BY and LIMIT, and learn the two checks that show whether its numbers are right before anybody acts on them.

    #sql#fundamentals#join#group-by#reporting#project
  13. 13

    Subqueries — Using One Query's Result Inside Another

    Put a query in brackets inside another query: compare with the value it returns, test a list with IN, or query the table it builds, and check which average you are really comparing with.

    #sql#intermediate#subqueries#in#having#grain
  14. 14

    Subqueries (v2 pilot) — Using One Query's Result Inside Another

    Put a query in brackets inside another query: compare with the value it returns, test a list with IN, or query the table it builds, and check which average you are really comparing with.

    #sql#intermediate#subqueries#in#having#grain