Snowflake Introduction
By the end of this lesson you will be able to explain what Snowflake is, when a company uses it instead of an app database like MySQL, and what a first Snowflake query session looks like.
What is Snowflake?
Snowflake is a cloud data platform. Companies load their business data into it, then analysts and engineers query that data with SQL. It is sold as a service: you never install it, patch it or buy servers. You sign in through a web browser, and Snowflake runs on a cloud provider of your choice, Amazon Web Services (AWS), Microsoft Azure or Google Cloud.
Its main job is to be a data warehouse: one central place that holds cleaned, joined, historical data from many sources, ready for reports and analysis. Over the years Snowflake has added more, such as data sharing, data pipelines, Python with Snowpark and AI functions, but the warehouse is still the core and is what this course teaches.
App databases and warehouses do different jobs
Think of a busy kirana shop in Jaipur. The billing counter handles one customer at a time, very fast: scan, total, take UPI payment, print the bill. At the end of the year, the owner sits with all the old bills to answer questions like "Which month sold the most?" That is slow, big work over lots of history.
Databases split the same way:
| App database (OLTP) | Data warehouse (OLAP) | |
|---|---|---|
| Example | MySQL or PostgreSQL behind a shopping app | Snowflake |
| Typical query | Fetch or change one order | Summarise millions of orders |
| Rows touched | A few | Millions or billions |
| Users | The app, thousands of times a second | Analysts, dashboards, data pipelines |
| Data | The current state | Current plus years of history |
OLTP means online transaction processing: many small reads and writes. OLAP means online analytical processing: fewer, much bigger read queries. You can run a report on MySQL, but as data grows it slows the app down. A warehouse keeps that heavy work away from the app.
What makes Snowflake different
Older warehouses were one big machine (or cluster) where storage and processing were joined together. If month-end reports needed more power, you bought a bigger machine and kept paying for it all year. Snowflake made three design choices that changed this:
- Storage and compute are separate. Data sits in cloud storage. Processing power, called a virtual warehouse, is rented by the second and can be started, stopped or resized at any time.
- Many warehouses can read the same data at once. The finance team's dashboard does not slow down the data engineers' loading job, because each team uses its own warehouse.
- It is fully managed. There are no indexes to build, no disks to tune and no vacuuming. Snowflake handles storage layout, backups and upgrades itself.
You will study each of these in the architecture lesson.
Snowflake editions
Snowflake comes in editions. Each one includes everything in the one before it. Feature availability matters because some lessons in this course use Enterprise features.
| Edition | Adds (examples) |
|---|---|
| Standard | Core warehouse, Time Travel up to 1 day, encryption |
| Enterprise | Multi-cluster warehouses, Time Travel up to 90 days, masking and row access policies, materialized views |
| Business Critical | Stronger compliance support, private connectivity, more data protection options |
| Virtual Private Snowflake (VPS) | A completely separate Snowflake environment for one organisation |
Prices differ by edition, cloud and region, and Snowflake publishes them on its own website. This course never quotes prices. Instead you will learn how credits, Snowflake's unit of compute usage, are consumed, which is the skill you actually need at work.
Your first queries
Step 1: Every Snowflake session has a context: which role you are, which warehouse runs your queries, and which database and schema you are in. You set it with USE statements:
USE ROLE analyst;
USE WAREHOUSE analytics_wh;
USE DATABASE shop_db;
USE SCHEMA sales;status ------------------------------- Statement executed successfully. (1 row)
Each USE returns the same one-row status. After Step 1 you should see your role, warehouse, database and schema in the worksheet's context menu.
Step 2: Check the context with Snowflake's context functions:
SELECT CURRENT_ROLE(), CURRENT_WAREHOUSE(), CURRENT_DATABASE();CURRENT_ROLE() | CURRENT_WAREHOUSE() | CURRENT_DATABASE() ---------------+---------------------+------------------- ANALYST | ANALYTICS_WH | SHOP_DB (1 row)
Notice the names come back in capital letters. Snowflake stores unquoted names in upper case, so analytics_wh and ANALYTICS_WH are the same warehouse.
Step 3: Run a normal analytics query. Most of the SQL you already know works unchanged. This monthly revenue report runs in your browser on the practice database:
SELECT SUBSTR(o.order_date, 1, 7) AS order_month,
COUNT(DISTINCT o.order_id) AS orders,
SUM(oi.quantity * oi.unit_price) AS revenue
FROM orders o
JOIN order_items oi ON oi.order_id = o.order_id
WHERE o.status <> 'cancelled'
GROUP BY SUBSTR(o.order_date, 1, 7)
ORDER BY order_month;order_month | orders | revenue ------------+--------+-------- 2025-01 | 3 | 23544 2025-02 | 2 | 12947 2025-03 | 3 | 7697 2025-04 | 3 | 43691 2025-05 | 3 | 16595 (5 rows)
April is the best month because order 110 bought two monitors. In Snowflake you would usually write the month as DATE_TRUNC('month', o.order_date), which returns the first day of each month as a date, and you could write GROUP BY ALL instead of repeating the expression:
SELECT DATE_TRUNC('month', o.order_date) AS order_month,
COUNT(DISTINCT o.order_id) AS orders,
SUM(oi.quantity * oi.unit_price) AS revenue
FROM orders o
JOIN order_items oi ON oi.order_id = o.order_id
WHERE o.status <> 'cancelled'
GROUP BY ALL
ORDER BY order_month;ORDER_MONTH | ORDERS | REVENUE ------------+--------+--------- 2025-01-01 | 3 | 23544.00 2025-02-01 | 2 | 12947.00 2025-03-01 | 3 | 7697.00 2025-04-01 | 3 | 43691.00 2025-05-01 | 3 | 16595.00 (5 rows)
The numbers match. Snowflake shows 23544.00 because unit_price is a NUMBER(10,2) there, while the browser's SQLite prints whole numbers. Column headings are upper case for the same reason as before.
Who uses Snowflake at work
- Data engineers load and transform data and build pipelines.
- Analytics engineers model clean tables for reporting, often with dbt.
- Data analysts write SQL for reports and dashboards in tools like Power BI or Tableau.
- Data scientists pull features for models, sometimes with Python through Snowpark.
- Administrators manage roles, security and spending.
This course gives you a working base for all of these roles, with extra depth on SQL, loading and cost.
Key points
- Snowflake is a fully managed cloud data platform whose core is a SQL data warehouse.
- Warehouses (OLAP) answer big analytical questions; app databases (OLTP) handle many small transactions.
- Storage and compute are separate, and compute (virtual warehouses) is rented by the second.
- Every session has a context: role, warehouse, database and schema, set with
USE. - Unquoted names are stored in upper case.
- Editions add features; this course says when a feature needs Enterprise or higher.
Exercise
Write a portable query on the practice database that shows, for each order status, the number of orders and the total value of their order lines. Sort by total value, highest first. Then write, as plain text, how you would group by month in Snowflake instead of using SUBSTR.
Show solution
SELECT o.status,
COUNT(DISTINCT o.order_id) AS orders,
SUM(oi.quantity * oi.unit_price) AS total_value
FROM orders o
JOIN order_items oi ON oi.order_id = o.order_id
GROUP BY o.status
ORDER BY total_value DESC;COUNT(DISTINCT o.order_id) counts orders, not order lines, because one order can have several lines. In Snowflake you would use DATE_TRUNC('month', o.order_date) to group by month.
Quick Quiz
1. What is the main job of a data warehouse such as Snowflake?
Warehouses are built for OLAP: large read queries over history.
2. In Snowflake, what is a virtual warehouse?
Warehouses are compute; data lives separately in storage.
3. You create a warehouse called analytics_wh without quotes. How does Snowflake store the name?
Unquoted identifiers are stored in upper case.
4. Which edition first includes multi-cluster warehouses and Time Travel up to 90 days?
Both are Enterprise Edition features.
Learn Snowflake with a mentor
Free lessons get you started. Our Data Analytics & Power BI training adds real projects and code reviews from working developers.
- Project-based learning
- Mentor code reviews
- Free counselling call
