
Welcome to SQL for Data with Snowflake. In this first lecture you meet your instructor and get a quick tour of what this course covers: SQL fundamentals, the Snowflake cloud data platform, and how SQL is used by data analysts, data scientists and data engineers. A short start before you write your first SQL query.
Meet your instructor, a data professional with 10+ years as a data analyst, data scientist and data engineer. Find out who this SQL course is for: beginners learning SQL for data, people curious about Snowflake, and anyone pivoting into a data career. You will also see exactly what you will learn and how the course is structured.
What is the world of data, and why do companies invest so much in it? This lecture explains how raw data becomes business insight and introduces the main data roles: data analyst, data scientist and data engineer, plus related roles like analytics engineer, ML engineer and data architect. Understand where SQL fits in every one of them.
What do you need to succeed in this SQL and Snowflake course? A computer, an internet connection and a Snowflake account, which you will set up step by step later in the course. This lecture covers the mindset that matters most: curiosity, regular practice and learning from your mistakes, so you keep growing your SQL and data skills long after the course ends.
A full roadmap of the course: SQL foundations, Snowflake intro, SQL joins, subqueries and CTEs, window functions, data cleaning and data transformation with SQL, and ELT pipelines on Snowflake. It ends with three hands-on capstone projects for data analysts, data scientists and data engineers. See what you will be able to build at each step.
Start your SQL journey here. SQL is the one technical skill every data analyst, data scientist and data engineer is expected to have. This section introduces the basics of the SQL language and core data concepts, backed by practical examples and hands-on SQL exercises you will run in Snowflake.
A quick map of the SQL foundations section: what SQL is, SQL dialects, the main components of SQL (DDL, DML, DQL, DCL), the relational model, relational database concepts, data types, and basic data retrieval and aggregation with SELECT, WHERE, GROUP BY and HAVING.
What is SQL and why is it the standard language for databases? Learn what Structured Query Language means, how relational databases organise data in linked tables, and how SQL dialects differ across PostgreSQL, Oracle, SQL Server (T-SQL) and Snowflake SQL. You will also meet the four SQL components: DDL, DML, DQL and DCL.
Understand the relational model, the foundation of every SQL database. Learn how tables relate to each other through primary keys, composite keys and foreign keys, and how one-to-one, one-to-many and many-to-many relationships work, using a simple customers and orders example.
Learn the building blocks of a relational database: databases, schemas, tables and views. See how the database hierarchy is organised, why SQL views simplify complex queries, standardise KPIs and improve security, and how regular views, materialized views and Snowflake secure views differ.
A short guide to SQL data types: INTEGER, VARCHAR/STRING, DATE, BOOLEAN and TIMESTAMP. Learn why the data type of a column matters, how types can vary slightly between SQL engines and data warehouses like Snowflake, and how choosing the right type avoids errors later.
Write your first SQL queries. Learn the structure of a SELECT statement: SELECT, FROM, WHERE, ORDER BY and LIMIT. Filter rows with comparison and logical operators (AND, OR, NOT), use IN, BETWEEN and LIKE, sort results ascending or descending, and see why SELECT * is fine for exploration but not for production.
Create your Snowflake account step by step. This lecture walks you through signing up for a Snowflake trial and logging in to Snowsight, so you have a free cloud data warehouse ready to practise every SQL query in this course.
Set up your Snowflake environment for hands-on SQL practice. Create the database, schema, warehouse and sample tables used throughout the course, so you can follow every practical example and assignment directly in Snowflake.
Put SELECT, WHERE, ORDER BY and LIMIT to work in a hands-on Snowflake SQL demo. Follow along as we query real tables, filter rows, combine conditions and sort results, the everyday SQL data retrieval tasks of any data analyst.
Your first SQL assignment: retrieve all orders above $200 placed in 2024 and sort them in ascending order. Practise filtering with WHERE, combining conditions with AND, filtering by date and sorting with ORDER BY in Snowflake.
Step-by-step solution to the basic data retrieval assignment. See how to filter orders by amount and year, sort the results, and write clean, readable SQL in Snowflake. Compare it with your own query and learn common mistakes to avoid.
Turn raw data into KPIs with SQL aggregate functions: COUNT, SUM, AVG, MIN and MAX. Learn how GROUP BY summarises data by category, the rule that every non-aggregated column must be in GROUP BY, and how HAVING filters aggregated results, the basis of every dashboard and report.
A hands-on Snowflake demo of SQL aggregations. Follow along as we use COUNT, SUM and AVG with GROUP BY to summarise orders, then filter groups with HAVING, the same queries data analysts use to build business metrics.
Your next SQL challenge: find the total and average order amount per month. Practise SUM, AVG and GROUP BY with date functions in Snowflake to build a simple monthly sales report.
Step-by-step solution to the monthly aggregation assignment. Learn how to group orders by month in Snowflake, calculate total and average amounts, and order the results so the report is ready for business users.
A quick recap of SQL foundations: what SQL is, the relational model, relational database concepts, data types, data retrieval with SELECT and WHERE, and aggregations with GROUP BY and HAVING. You are now ready to explore Snowflake in depth.
Get to know Snowflake, the cloud data platform used by data teams worldwide. This section explains what Snowflake is, how its architecture works, how to create Snowflake objects, load data and use its standout features, so you can run SQL on Snowflake with confidence.
A roadmap of the Snowflake intro section: what Snowflake is, a Snowsight walkthrough, creating databases, schemas, tables and warehouses, loading data into Snowflake, special features like Time Travel and Zero-Copy Cloning, and other capabilities like streams and tasks.
What is Snowflake? Learn why this fully managed cloud data platform runs on AWS, Azure and GCP, and how separating storage and compute changes data warehousing. Explore the three-layer Snowflake architecture (cloud services, compute, storage) and key concepts: databases, schemas, tables, views, stages, virtual warehouses and role-based access control.
A guided tour of the Snowflake web interface (Snowsight). See where to write and run SQL worksheets, browse databases and schemas, manage virtual warehouses and check query history, so you can navigate Snowflake quickly from day one.
Learn to create Snowflake objects with SQL: CREATE DATABASE, CREATE SCHEMA, CREATE TABLE and CREATE WAREHOUSE. Understand permanent, transient and temporary tables, and configure virtual warehouses with size, AUTO_SUSPEND and AUTO_RESUME to control compute costs.
How do you load data into Snowflake? Compare every option: loading files through internal stages with PUT and COPY INTO, external stages on AWS S3, Google Cloud Storage and Azure Blob, automated loading with Snowpipe, streaming ingestion with Kafka and the Snowpipe Streaming API, external tables, and programmatic loading with Python, JDBC and ODBC.
Discover the Snowflake features that save time and money: Time Travel to query or restore past data, Fail-safe for disaster recovery, Zero-Copy Cloning for instant dev and test environments, result caching and warehouse caching, secure data sharing, and micro-partitioning and clustering for faster queries.
A quick look at more Snowflake capabilities: semi-structured data support for JSON and other formats with VARIANT, Snowflake streams for change data capture, and Snowflake tasks for scheduling SQL. Know what is possible as your data projects grow.
A recap of the Snowflake essentials: Snowflake architecture, creating databases, schemas, tables and warehouses, loading data into Snowflake, and features like Time Travel, Zero-Copy Cloning and caching. You are ready to write more advanced SQL on Snowflake.
Learn to combine data from multiple tables with SQL joins, one of the most important skills in data analytics. Business data is almost never in one table, so this section shows you how joins enrich your analysis, with practical examples and exercises in Snowflake.
A roadmap of the SQL joins section: why joins exist, a relational model recap with primary and foreign keys, the five join types, then INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN and CROSS JOIN one by one, followed by a practical example and assignment.
Why do SQL joins exist? Learn how relational databases split data across tables to avoid duplication and scale with the business, and how a JOIN brings that data back together. Understand why orders, customers and products live in separate tables and how SQL combines them in one query.
A quick recap of the relational model before writing SQL joins. Review how primary keys uniquely identify rows, how foreign keys point to records in another table, and how join conditions use these keys, including joins on multiple keys and across multiple tables.
What types of SQL joins are there? Get an overview of INNER JOIN, LEFT (OUTER) JOIN, RIGHT (OUTER) JOIN, FULL (OUTER) JOIN and CROSS JOIN, and learn why table granularity and cardinality decide which join you should use.
Master the SQL INNER JOIN, the most common join in analytics. Learn the syntax with ON conditions, see how it returns only rows that match in both tables, how it is used to join fact and dimension tables, and visualise it with a Venn diagram using an orders and customers example.
Learn the SQL LEFT JOIN and RIGHT JOIN. See how a LEFT JOIN keeps every row from the left table, such as all customers even those without orders, and fills unmatched columns with NULL. Learn why left joins are ideal for data quality checks and finding missing data, and how a RIGHT JOIN mirrors it.
Understand the SQL FULL OUTER JOIN: it returns matching rows plus all non-matching rows from both tables. Learn its syntax, when to use it for data reconciliation and data quality checks, and why it can be expensive on large datasets.
Learn how the SQL CROSS JOIN returns the Cartesian product of two tables, combining every row on the left with every row on the right. See when it is useful, for small dimension tables, and why it can explode result sizes and compute costs on large datasets.
A hands-on SQL joins demo in Snowflake. Follow along as we write different SQL join types on customers and orders tables, compare the results side by side and see exactly how each join type behaves.
Your SQL joins challenge: list all customers with their total number of orders and total sales, including customers with no orders. Practise LEFT JOIN, COUNT, SUM and GROUP BY in Snowflake.
Step-by-step solution to the SQL joins assignment. See why a LEFT JOIN is needed to keep customers without orders, how to aggregate orders and sales per customer, and how to make customers with zero orders show up correctly in Snowflake.
A recap of SQL joins: why we join tables, the relational model and keys, and when to use INNER, LEFT, RIGHT, FULL OUTER and CROSS JOIN. You are ready for more advanced SQL: subqueries and CTEs.
Take your SQL to the next level with two advanced techniques: SQL subqueries and common table expressions (CTEs). This section shows how to build complex, readable and scalable queries in Snowflake without hardcoding values.
A roadmap of this advanced SQL section: what subqueries are, the three types (in WHERE, SELECT and FROM), a practical subqueries example, then an introduction to CTEs with the WITH clause, their advantages and a hands-on CTE assignment.
What is a SQL subquery? Learn how a query nested inside another query, enclosed in parentheses, can return a single value, a column or a whole table, and why subqueries help you avoid hardcoding values and lists into your SQL.
Learn the three types of SQL subqueries based on where they appear: in the WHERE clause, in the SELECT list and in the FROM clause. Understand when a subquery runs once and when a correlated subquery runs once per row, and why that matters for performance.
Filter data dynamically with a SQL subquery in the WHERE clause. See how WHERE customer_id IN (SELECT …) returns only orders from US customers without typing a long hardcoded list, a scalable pattern every SQL developer uses.
Learn scalar subqueries in the SELECT statement, which return exactly one value per row. See how to show each order amount next to the average order amount, so you can compare values without hardcoding the average, and why this stays correct as new data arrives.
Use a SQL subquery in the FROM clause as a temporary table (derived table). Learn how to calculate total spent per customer with GROUP BY inside the subquery, why an alias is mandatory, and how this pattern helps you build multi-step analytical queries.
A hands-on SQL subqueries demo in Snowflake. Follow along as we write subqueries in WHERE, SELECT and FROM on real tables and see how each one changes the result, so you know which type to use for each problem.
What is a CTE (common table expression)? Learn how the WITH clause defines a temporary, named result set that makes complex SQL queries readable and easier to break into logical steps, and why a CTE only exists within the query that defines it.
Why do data professionals love CTEs? Learn how common table expressions make SQL modular, easier to debug step by step and closer to an ETL mindset. See the WITH … AS syntax in action with a customer_totals example that finds customers who spent over 1,000.
Your CTE challenge: find the top 3 customers by total purchase value. Practise writing a common table expression with the WITH clause, aggregating with SUM and GROUP BY, and sorting and limiting results in Snowflake.
Step-by-step solution to the CTE assignment. See how to calculate total purchases per customer in a CTE, rank the results and return the top 3 customers in clean, readable Snowflake SQL.
A recap of SQL subqueries and CTEs: the three subquery types, when to use a common table expression, and how both help you write scalable SQL. Next up: SQL window functions.
Learn SQL window functions, one of the most powerful advanced SQL features for analytics. You will use them constantly to build running totals, rankings and comparisons for reports and datasets, all practised hands-on in Snowflake.
A roadmap of the window functions section: basic OVER() syntax, window functions vs GROUP BY, aggregate, ranking and offset window functions, window frames, ROWS vs RANGE, common examples like running totals and moving averages, plus a practical example and assignment.
What are SQL window functions? Learn how they calculate across a set of rows related to the current row without collapsing rows, the key difference from GROUP BY, and why they power analytical queries like running totals and rankings.
Learn the window function syntax step by step: the function, the OVER() clause, PARTITION BY to define groups, ORDER BY to sort rows inside each partition, and the frame clause (ROWS BETWEEN …) that sets which rows enter each calculation.
Window functions vs GROUP BY: what is the difference? Compare SUM(amount) with GROUP BY, which returns one row per customer, against SUM(amount) OVER (PARTITION BY customer_id), which keeps every order row and adds each customer's total spent next to it.
Explore the three categories of SQL window functions. Aggregate functions (SUM, AVG, COUNT, MIN, MAX) for percent-of-total and benchmarking; ranking functions ROW_NUMBER, RANK, DENSE_RANK and NTILE for deduplication and segmentation; and offset functions LAG, FIRST_VALUE and LAST_VALUE for change detection and time-series deltas.
Control exactly which rows a window function uses with window frames. Learn UNBOUNDED PRECEDING, CURRENT ROW and UNBOUNDED FOLLOWING, and how to define frames like two rows back or one row forward to calculate values inside each partition.
ROWS vs RANGE in SQL window frames: what is the difference? Learn why ROWS counts physical rows and is deterministic and preferred for time series, while RANGE groups rows with the same ORDER BY value and can give unexpected results with duplicates. Also see why LAST_VALUE needs an explicit frame.
The window function patterns you will use every week: a running total (cumulative sum per customer), a full partition aggregate, a 7-row moving average and a forward-looking window. See the exact SQL syntax for each and when to use it in real analysis.
A hands-on SQL window functions demo in Snowflake. Follow along as we write running totals, rankings and offset calculations on real data and see how PARTITION BY, ORDER BY and window frames change the results.
Your window functions challenge: calculate each customer's cumulative spending over time and rank all customers by total spending. Practise SUM() OVER with PARTITION BY and ORDER BY, plus RANK or DENSE_RANK, in Snowflake.
Step-by-step solution to the window functions assignment. See how to build a running total of spending per customer and rank customers by total spend in Snowflake, and how to choose between RANK and DENSE_RANK when there are ties.
A recap of SQL window functions: OVER() syntax, the difference from GROUP BY, aggregate, ranking and offset functions, window frames and ROWS vs RANGE. You now have the advanced SQL toolkit to clean and transform data.
Real-world data is messy, even when its owners say it is not. This section teaches data cleaning with SQL on Snowflake: how to find and fix data quality issues so your analysis, KPIs and machine learning datasets can be trusted.
A roadmap of the data cleaning section: why data is imperfect, the main types of data cleaning operations, data deduplication with SQL, handling missing values and NULLs, and fixing inconsistent formats and data types.
Why is data cleaning essential? Learn the three pillars of data quality, accuracy, completeness and consistency, and the typical problems you will meet in any company: missing values, wrong data types, broken formats and columns that change without warning.
Learn the three main data cleaning operations in SQL: data deduplication to fix duplicate records (accuracy), handling missing data (completeness), and standardising inconsistent formats (consistency), and how each one maps to a data quality problem.
Remove duplicate records with SQL. See why duplicates distort KPIs and business decisions, then learn two deduplication techniques in Snowflake: SELECT DISTINCT in a view, and a CTE with the ROW_NUMBER() window function to keep exactly one row per key.
Handle missing values and NULLs in SQL. Learn when to ignore, delete or impute missing data, imputation options (constant, mean, median, mode, interpolation, machine learning), and the SQL functions that do the job: COALESCE, NULLIF, IFNULL and CASE WHEN.
Standardise messy data with SQL. Fix inconsistent text with TRIM, LTRIM, RTRIM, LOWER, UPPER, INITCAP, REPLACE and regex, convert wrong data types with CAST and TRY_CAST, and normalise dates with DATE_TRUNC in Snowflake.
A recap of data cleaning with SQL: deduplication with DISTINCT and ROW_NUMBER, handling missing values with COALESCE and imputation, and fixing inconsistent formats and data types. Next: data transformations with SQL.
Learn data transformation with SQL: how to reshape data so it is ready for analysis, dashboards and machine learning. This section applies everything you have learned, from aggregations to window functions, to the core transformation operations in Snowflake.
A roadmap of the data transformations section: why data structure matters, the main transformation operations (sorting, aggregations, filtering, window functions), and additional transformations like calculated columns, ratios and flags, PIVOT, and CASE WHEN bucketing.
What is data transformation? Learn the difference between fixing data content (cleaning) and changing data structure (transformation), and why raw data is rarely in the right shape for analysis. Understand how SQL reshapes datasets so you can draw conclusions from them.
Learn the four main data transformation operations in SQL: sorting, aggregations, filtering and window functions. See how each one adds or removes rows or columns, and how they change the structure, and sometimes the content, of your dataset.
Sort data with SQL ORDER BY. Learn ascending and descending sorting by one or more columns, and how sorting powers everyday business views like top 10 products by sales or bottom 5 stores, with a simple example you can reuse.
Aggregations as a data transformation: see how GROUP BY reduces rows and reshapes a dataset. Calculate totals, averages, counts, minimums and maximums per category with SUM, AVG, COUNT, MIN and MAX, the core of analytical SQL queries.
Filter data with SQL WHERE and HAVING. Learn how WHERE subsets rows before aggregation, how HAVING filters aggregated results after GROUP BY, and how both change the shape of your dataset.
Use SQL window functions as a data transformation tool. See how they add new calculated columns, like cumulative sums, first values and last values, while keeping every row of the original dataset, with a practical category and value example.
Go beyond the basics with more SQL data transformations: calculated columns for revenue and date metrics, ratios and boolean flags for high-value customers or churn risk, PIVOT to turn rows into columns for dashboards, and CASE WHEN for customer segmentation, revenue tiers and bucketing.
A recap of data transformations with SQL: sorting, aggregations, filtering, window functions, calculated columns, flags, PIVOT and CASE WHEN bucketing. Next: building ELT pipelines on Snowflake.
Learn how data engineers build ELT pipelines on Snowflake using only SQL. This section covers loading data, automating transformations with Snowflake tasks and stored procedures, and is valuable for data analysts and data scientists who want to understand the full data pipeline.
A roadmap of the ELT section: ETL vs ELT, why Snowflake is built for ELT, data ingestion with stages, file formats and COPY INTO, automating pipelines with Snowflake tasks, and adding control flow with Snowflake stored procedures.
ETL vs ELT: what is the difference? Learn how data pipelines extract, transform and load data, how ETL transforms in a staging area before loading while ELT loads raw data first and transforms inside the warehouse, and the pros, cons and use cases of each approach.
Why is modern data engineering ELT, not ETL? Learn how Snowflake works as the execution engine of your pipeline: load raw data first, transform it inside the warehouse with SQL, and scale with the platform. See why SQL now runs ingestion, transformation and orchestration.
Load data into Snowflake with SQL. Learn internal and external stages (AWS S3, GCS, Azure Blob), the COPY INTO command and its options ON_ERROR, PURGE, VALIDATION_MODE and PATTERN, and how to define file formats for CSV, JSON, Parquet, Avro, ORC and XML, including compression and delimiter settings.
Automate SQL transformations with Snowflake tasks. Learn how to create a scheduled task with a warehouse and CRON schedule, and how to chain dependent tasks with AFTER to build DAG-style ELT pipelines fully inside Snowflake.
Learn Snowflake stored procedures for ELT pipelines. See when you need control flow, multiple statements or reusable code, how to write a procedure with CREATE PROCEDURE in SQL (Python is also supported), and how to schedule it with a Snowflake task using CALL.
A recap of ELT with Snowflake: ETL vs ELT, data ingestion with stages and COPY INTO, Snowflake tasks for automation and stored procedures for complex logic. You are now ready for the hands-on capstone projects.
Apply your SQL skills in a real-world data analyst project on Snowflake. This is the first of three capstone projects, each built around a data role. Here you will answer real business questions with SQL, a great portfolio piece for aspiring data analysts.
A roadmap of the data analyst capstone: the SQL skills you will practise, the e-commerce business case, setting up the project in Snowflake, and five SQL tasks covering revenue, regions, products, categories and top customers.
The SQL skills a data analyst uses every day: aggregations, joins, GROUP BY, sorting and window functions. This lecture explains how each skill is used in the capstone to turn raw e-commerce data in Snowflake into business answers.
You are a data analyst at an e-commerce company, and leadership needs answers: how is the business performing, which products and categories drive revenue, who are the most valuable customers, and which regions perform best. A realistic sales performance analysis you will solve with SQL on Snowflake.
Set up the data analyst capstone in Snowflake step by step. Create the database, schema and tables, and load the e-commerce sales data so you are ready to write the SQL queries that answer each business question.
Learn SQL from scratch and use it the way real data teams do, on Snowflake, one of the leading cloud data platforms.
SQL is the one skill every data analyst, data scientist and data engineer is expected to have. This hands-on, beginner-friendly SQL course takes you from your first SELECT statement to advanced SQL and full Snowflake projects, with practical examples, assignments and three role-based capstone projects.
What you will learn
SQL foundations: SELECT, WHERE, ORDER BY, GROUP BY and HAVING, the relational model, keys, schemas, views and data types
Snowflake essentials: architecture, virtual warehouses, creating databases and tables, loading data with stages and COPY INTO, Time Travel and Zero-Copy Cloning
SQL joins: INNER, LEFT, RIGHT, FULL OUTER and CROSS JOIN, and when to use each
Subqueries and CTEs: write readable, modular queries with the WITH clause
SQL window functions: running totals, rankings and moving averages with ROW_NUMBER, RANK, DENSE_RANK, LAG and PARTITION BY
Data cleaning with SQL: remove duplicates, handle missing values and NULLs, fix inconsistent formats and data types
Data transformation with SQL: calculated columns, flags, PIVOT and CASE WHEN segmentation
ELT pipelines on Snowflake: automate SQL transformations with Snowflake tasks and stored procedures
Three capstone projects, one for each data role
Data Analyst: answer leadership's questions on an e-commerce business, revenue by region, product and category, and top customers.
Data Scientist: build a machine-learning-ready feature dataset to predict which customers will make a purchase.
Data Engineer: build a sales data warehouse with a staging layer, cleaned tables, a star schema and an analytics view.
Who this course is for
Beginners who want to learn SQL for data, with no prior experience required
Aspiring data analysts, data scientists and data engineers
Professionals pivoting into a data career
Anyone who wants practical, job-ready Snowflake SQL skills
About your instructor
I'm Ricardo Gonçalves, and I have worked with data for more than 10 years as a data analyst, data scientist and data engineer. In this course I share what works in real projects, and the mistakes to avoid, so you can write SQL with confidence from day one.
Enroll now and start writing real SQL on Snowflake today.