Module 02 · Foundation & SQL

Architecture, Warehouses & Billing Basics

Read a clear definition, compare the concepts, then try the SQL or client command. Detailed explanations and diagrams remain available when you need them.

Before you begin

Beginner · 9 lessons · About 205 minutes including detailed reading.

Prerequisite: Introduction, Setup & Connectivity. Reading needs no account. Manual SQL practice requires an authorized Snowflake account, suitable role and warehouse. Commands are examples, not executed by this website.

The warehouse lessons include manual suspend/resume and scaling exercises. Use a dedicated learning warehouse; timing, queueing and costs depend on your workload and account.

Begin Module 02 →
New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.
Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.
What this module covers

Your lesson path

  1. Lesson 1 · About 20 min

    Follow a query through storage, compute and cloud services

    Snowflake separates persistent storage, query compute and coordination into three layers.

    Read and practise →
  2. Lesson 2 · About 20 min

    Micro-partitions, columnar storage and compression

    Snowflake automatically divides standard-table data into small storage units called micro-partitions. Values are stored by column and compressed, helping queries avoid reading unnecessary data.

    Read and practise →
  3. Lesson 3 · About 25 min

    Metadata and the query optimizer

    Metadata describes data. The optimizer uses that information to choose an execution plan.

    Read and practise →
  4. Lesson 4 · About 20 min

    Virtual warehouses, sizes and states

    A virtual warehouse supplies compute for supported queries and operations.

    Read and practise →
  5. Lesson 5 · About 20 min

    Auto-suspend and auto-resume through a small lab

    Auto-suspend stops idle warehouse compute. Auto-resume starts it when required work arrives.

    Read and practise →
  6. Lesson 6 · About 25 min

    Scaling up, scaling out and multi-cluster warehouses

    Scale up adds capacity per cluster. Scale out adds clusters for concurrent demand.

    Read and practise →
  7. Lesson 7 · About 25 min

    Concurrency and query queueing

    Concurrency is overlapping work. Queueing is time spent waiting for work to proceed.

    Read and practise →
  8. Lesson 8 · About 25 min

    Serverless features and their compute responsibilities

    Serverless features use compute provisioned and managed by Snowflake for that service.

    Read and practise →
  9. Lesson 9 · About 25 min

    Credits, compute billing, storage and cloud services

    Estimate compute in credits and storage using its applicable measured volume and rate.

    Read and practise →

Continue learning

Module 03: Database Objects & SQL Foundations →

Full curriculum and reference library →