Learn BigQuery

Google Cloud's serverless data warehouse, queried with GoogleSQL

18 lessons · 4 hours · 4 levels · covers BigQuery GoogleSQL, 2026

BigQuery is Google Cloud's fully managed, serverless data warehouse: you load or point at data and query terabytes with SQL, with no servers or clusters to manage. It is widely used for analytics, BI dashboards, marketing and product data (GA4 exports land there) and ELT pipelines. Learning it means learning GoogleSQL's nested data model and how partitioning, clustering and slots drive cost and speed.

Before you start

BigQuery builds on these; the tree links to the exact lessons you need.

How deep do you want to go?

1. EssentialsRead and write simple code, do the everyday basics6 lessons · 1 hour in total
2. PracticalUse it productively at work, with the usual idioms11 lessons · 2 hours in total
3. AdvancedThe less common features, performance and trade-offs15 lessons · 3 hours in total
4. ExpertInternals and the edge cases experts know18 lessons · 4 hours in total

The BigQuery tree

BigQueryHow BigQuery is organizedHow BigQuery isorganizedRunning queries and dry runsRunning queries anddry runsWhat you pay for: bytes, slots and storageWhat you pay for:bytes, slots and sto…GoogleSQL data typesGoogleSQL datatypesGoogleSQL features worth knowingGoogleSQL featuresworth knowingLoading and exporting dataLoading andexporting dataArrays and UNNESTArrays and UNNESTSTRUCTs and nested, repeated schemasSTRUCTs andnested, repeated s…Partitioned tablesPartitioned tablesClustered tablesClustered tablesDML, MERGE and transactionsDML, MERGE andtransactionsSELECT: reading dataSELECT: reading dataChoosing data typesChoosing data typesGROUP BY and HAVINGGROUP BY andHAVINGUpserts: ON CONFLICT and MERGEUpserts: ONCONFLICT and MER…Views and materialized viewsViews andmaterialized viewsInner joinsInner joinsReading query plans with EXPLAINReading query planswith EXPLAIN
Essentials and Practical shown (11 of 18 lessons); the full list is below. Click a lesson to read it.

All 18 lessons, in order

Basics and costs

  1. How BigQuery is organized · Essentials · 8 min

    Projects, datasets and tables; serverless execution on shared compute; and storage separated from compute.

  2. Running queries and dry runs · Essentials · 10 min

    Run GoogleSQL in the console or with bq query, estimate bytes with a dry run, and cap cost with maximum bytes billed.

  3. What you pay for: bytes, slots and storage · Essentials · 10 min

    On-demand queries bill per TiB scanned; capacity pricing bills slot-hours; storage bills per GiB with a long-term discount.

GoogleSQL querying

  1. GoogleSQL data types · Essentials · 10 min

    Use INT64, NUMERIC, STRING, BOOL, DATE, DATETIME, TIMESTAMP, JSON, ARRAY and STRUCT correctly.

  2. GoogleSQL features worth knowing · Essentials · 12 min

    Use SELECT * EXCEPT/REPLACE, QUALIFY, COUNTIF, IF/IFNULL, SAFE_DIVIDE, GROUP BY ALL and pipe syntax.

Table design and loading

  1. Loading and exporting data · Essentials · 12 min

    Load files from Cloud Storage with bq load or LOAD DATA, query them in place with external tables, stream rows, and export results.

  2. Partitioned tables · Practical · 14 min

    Partition tables by date, timestamp, ingestion time or integer range so filters prune data, and require partition filters.

  3. Clustered tables · Practical · 12 min

    Cluster tables by up to four columns so filters and aggregations skip storage blocks, alone or together with partitioning.

  4. DML, MERGE and transactions · Practical · 12 min

    Modify data with INSERT, UPDATE, DELETE and MERGE, use multi-statement transactions, and respect DML's performance traits.

Nested and repeated data

  1. Arrays and UNNEST · Practical · 12 min

    Store lists in ARRAY columns, turn them into rows with UNNEST, keep empty ones with LEFT JOIN, and build arrays with ARRAY_AGG.

  2. STRUCTs and nested, repeated schemas · Practical · 12 min

    Model records with STRUCT and ARRAY<STRUCT>, query nested fields, and know when denormalizing beats joins.

Scripting, functions and security

  1. Scripting and stored procedures · Advanced · 14 min

    Write multi-statement scripts with DECLARE, SET, IF, loops and EXECUTE IMMEDIATE, handle errors, and package logic in procedures.

  2. User-defined functions and table functions · Advanced · 12 min

    Write SQL and JavaScript UDFs, persistent or temporary, plus table functions, and know their performance costs.

  3. Views and materialized views · Advanced · 12 min

    Use logical views for reuse and security, and materialized views for precomputed, automatically refreshed aggregates.

  4. IAM, authorized views and row/column security · Advanced · 14 min

    Control access with IAM roles at project, dataset and table level, share subsets with authorized views, and restrict rows and columns.

Slots and internals

  1. Slots, reservations and editions · Expert · 14 min

    Understand slots as BigQuery's compute unit, compare on-demand with capacity pricing, and use reservations, autoscaling and assignments.

  2. Reading query plans and optimizing · Expert · 16 min

    Read the execution graph (stages, slot time, shuffle, skew) and apply proven optimizations for joins, aggregations and ordering.

  3. Storage internals, time travel and snapshots · Expert · 14 min

    See how Capacitor files on Colossus, the Dremel engine and in-memory shuffle fit together, and recover data with time travel, snapshots and clones.