
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Lecture 1 gives you the full course overview, the section breakdown, the instructor introduction, and who this course is for. Learn how SQL is taught with BigQuery and AI tools like ChatGPT, Copilot, and Gemini to build real-world analytics skills.
In this lecture, we address one of the biggest questions today: is SQL still worth learning when AI tools like ChatGPT, Copilot, and Gemini can generate queries for you?
You will learn why SQL is not going away, why AI often produces flawed or incomplete queries, and why professionals who understand SQL will be more valuable than ever. We explain how SQL knowledge lets you guide AI, catch mistakes, add business context, and deliver faster.
By the end of this session, you will understand why learning SQL now is not just relevant but essential for working effectively with AI in real-world analytics.
In this lecture we set up Google BigQuery inside Google Cloud. You will learn how to create a free project, enable BigQuery, and connect to the public ecommerce dataset called The Look. We cover how to add the dataset through BigQuery Studio, star it for easy access, and make sure your project is created in the US location so you can query it directly without issues. By the end, you will be fully set up and ready to run your first queries.
Take a quick tour of the BigQuery interface and learn where everything is before writing your first query. This lesson walks through the code editor, the left-hand navigation with projects, datasets, and tables, and the table details including schema and preview. By the end, you will know how to navigate BigQuery with confidence and explore your data easily.
Learn the foundation of SQL with the SELECT and FROM statements. You will understand how to pull specific columns, select all columns, remove duplicates, limit results, and rename outputs. By the end, you will be able to write clear and efficient starter queries for any dataset.
Learn how to filter rows in SQL using the WHERE clause. This lesson covers equality, comparison operators, numeric filters, date filters, combined conditions with AND and OR, and filtering by multiple values with IN. By the end, you will be able to control exactly which rows appear in your results.
Learn how to use aggregate functions in SQL to summarize data. This lesson covers MIN, MAX, AVG, and STDDEV, showing how to calculate minimums, maximums, averages, and variation across numeric columns. By the end, you will be able to generate quick insights without scanning every row.
Learn how to group rows in SQL using the GROUP BY clause. This lesson shows how to calculate averages per category or brand, summarize data across groups, and use GROUP BY ALL as a shortcut. By the end, you will be able to compare metrics across categories and identify meaningful patterns in your data.
Learn how to create new custom columns in SQL by combining or transforming existing ones. This lesson shows how to merge multiple columns, format strings for display, and derive new values using calculations. By the end, you will know how to shape query results without changing the original tables.
Learn how to detect and handle duplicate values in your data. This lesson explains why duplicates cause problems in joins and aggregations, and shows how to use COUNT, GROUP BY, and ORDER BY to identify issues. By the end, you will understand how to check data quality before running queries to ensure accurate results.
Learn how to detect and handle NULL values in SQL. This lesson explains what NULL really means, why it causes problems in joins, filters, and aggregations, and how to check for missing values using IS NULL and COUNT. By the end, you will know how to identify and manage NULLs so your queries stay accurate and reliable.
Learn how to use the CASE statement in SQL to add conditional logic directly into your queries. This lesson explains how to build if-else style conditions, categorize numeric values into ranges, and create flags or labels. By the end, you will understand the syntax, execution order, and best practices for writing reliable CASE expressions.
Learn how to use subqueries in SQL to nest one query inside another. This lesson explains how subqueries can be used to filter results, compare values, and simplify complex logic into smaller steps. By the end, you will understand the syntax, use cases, and best practices for writing effective subqueries.
Learn how to use Common Table Expressions (CTEs) to make your SQL queries more readable and maintainable. This lesson explains how to define a CTE with the WITH keyword, how to reuse it in your main query, and how to organize complex logic into smaller, named steps. By the end, you will know how to write clear, structured queries using CTEs.
Learn how to apply advanced filtering techniques in SQL to refine your queries with precision. This lesson covers pattern matching with LIKE, filtering on aggregated results with HAVING, and additional operators such as BETWEEN, IN, and EXISTS. By the end, you will know how to use the right filtering tool for ranges, lists, text patterns, and subquery checks.
Learn how to use window functions in SQL to calculate values across rows without collapsing your data. This lesson explains the key difference between GROUP BY and window functions, and demonstrates practical use cases such as numbering rows with ROW_NUMBER, ranking items with RANK, and adding totals with SUM OVER. By the end, you will understand how to apply partitioning and ordering to unlock advanced analytics with SQL.
Learn how to design queries in BigQuery that minimize cost while maximizing performance. This lesson covers best practices such as selecting only the columns you need, using partitions and clustered fields for filtering, choosing efficient join types, and leveraging query caching. By the end, you will know how to write faster and more cost-effective SQL.
Learn how to write SQL that is clear, consistent, and easy to maintain. This lesson covers formatting techniques, naming conventions, indentation, comments, and the use of CTEs to organize logic. By the end, you will be able to structure your queries so they are professional, readable, and easier to debug.
Learn how to effectively use AI tools to generate and refine SQL queries. This lesson covers prompting strategies, how to clearly state your SQL concept and business objective, specifying tables and columns, and validating results with data quality checks. By the end, you will know how to guide AI step by step, iterate on its output, and ensure the final query matches your business needs.
Congratulations on completing the course! In this wrap-up, we review everything you’ve learned — from SQL foundations like SELECT, WHERE, and GROUP BY, through intermediate skills such as joins, CASE statements, subqueries, and CTEs, to master-level topics like advanced filtering, saving results, window functions, cost-efficient queries, and clean coding practices. We also discuss how to take the next step by applying these skills in enterprise workflows with Dataform.
This course teaches you SQL for the real world — sharp, hands-on, and built for working with AI-powered tools like ChatGPT, Copilot, and Gemini.
Instead of just memorizing syntax, you'll learn how to think in SQL. That means you can write better prompts, sanity-check AI-generated queries, and deliver faster — because you actually understand what good SQL looks like.
We use BigQuery and real ecommerce data to walk through each concept: selecting data, filtering, grouping, joining, aggregating, and building clean logic with CASE WHEN, subqueries, and CTEs.
Disclaimer : We utilized AI voices to give you the most natural and easy to follow narration throughout the course.
You’ll not only build technical skill, but also develop the reasoning and pattern awareness needed to interact effectively with AI systems in real workflows.
By the end, you'll be able to:
Communicate clearly with AI tools by understanding query logic
Spot errors and bad assumptions in AI-generated SQL
Speed up your data work by blending prompting and hands-on writing
Build SQL workflows that are readable, testable, and production-friendly
This course is for:
Analysts, PMs, and engineers working with data
Beginners who want to skip fluff and learn how things actually work
Professionals using AI tools who want to prompt smarter
Anyone reviewing, modifying, or debugging AI-generated SQL
You’ll write code that makes sense. You’ll move faster with AI. And you’ll finally understand what’s going on under the hood.