sign up today

Ready to Go Pro with Maven Analytics

Ready to Go Pro with Maven Analytics

Sign up today an unlock full access to all data and AI learning content.

free email course

SQL with AI

Day 1

Beginner

free email course

SQL with AI

Day 1

Beginner

The Brief

Why this SQL course is different from any other SQL course you’ve taken before

Welcome, I'm John at Maven Analytics. I have over 15 years of business intelligence experience, having worked with companies ranging from Fortune 500 to early-stage startups. I’ve performed leadership roles across analytics, marketing, SaaS and product teams.

Something upfront that most SQL courses won't tell you: learning SQL has fundamentally changed. You don't need to memorise syntax. You need to understand how SQL works, and use AI alongside it while you're building that understanding. The combination of the two is what makes an analyst genuinely fast and genuinely accurate.

That's what this course is built around.

Over the next 5 days, you'll run a real Q1 sales review for Apex Retail, a fictional D2C (direct-to-consumer) electronics brand. Same type of task, same type of data, same thinking process a working analyst uses every day. By Day 4, you'll have gone from a raw table to a business story you could present to a non-technical leadership team.

Today is Day 1: get the data talking.

Before we jump into the analyst brief, let me walk you through the three guiding principles that will be the foundations of every email that you get from me:

  1. SQL + AI beats SQL alone. Not because AI writes the queries for you, but because AI cuts the learning curve, helps you interpret results and error messages, and handles the communication layer so you can move faster and deliver more.

  2. Implementation over memorization. The goal is never to recite syntax from memory. The goal is to answer a business question accurately and quickly, using every tool available.

  3. The last 10% is yours. AI can generate 90% of a query, fast. The analyst who actually understands the data, can validate the results, and translate the work to insights and drive business outcomes is still irreplaceable.

The scenario

You've just joined the Apex Retail data team. Your manager, Sarah (Head of Commerce), has one request:

"Leadership needs a Q1 sales review on Friday. I need to know what's going on with the business."

That brief is deliberately vague, real analyst briefs usually are. Your job over the next 5 days is to go from that question to a clear, data-backed story. Today you start by understanding what you're working with.

Environment Setup

Environment Setup

exercise 1

Take your first data snapshot

5 min

Just to reiterate how to run your SQL queries, you need to

  • paste the query into your editor by appending it to the bottom of your existing queries

  • highlight your query

  • hit RUN at the top right or use Control/Command + Enter

If you ever do get a little lost, just scroll back up and refer to these steps here or the guidance in the Environment setup module.

Let’s start with this. Paste the query below by appending it to the bottom of your existing queries.

SELECT * FROM orders
ORDER BY order_date
LIMIT 10

You're asking: show me the first 10 orders, chronologically. Scroll through the results. Before you do any analysis, answer these three questions in your head:

  1. What time period does this data cover?

  2. Which columns would matter most to Sarah?

  3. Does anything look unusual in the data?

Now run a proper baseline summary: (we’ve already done a quick sense check before on the total number of rows, minimum and maximum dates, and the total revenue, remember?)

SELECT
  COUNT(*)                    AS total_orders,
  MIN(order_date)             AS period_start,
  MAX(order_date)             AS period_end,
  ROUND(SUM(revenue), 2)      AS total_revenue,
  ROUND(AVG(revenue), 2)      AS avg_order_value
FROM

In five lines, you now know: how many orders exist, what period they cover, total revenue, and average order value. This is your baseline. Every other number this week gets measured against it.

The AI move: paste your baseline result into Copilot, Claude, or ChatGPT and ask: "I'm running a Q1 sales review and this is my baseline. What would a Head of Commerce want to understand next, in priority order?" Save the response. You'll use it this week.

Pro Tip: if at any point you do not understand a query, simply ask AI to explain. Use this prompt: “Explain the following SQL query to me step-by-step, like I’m an analyst who’s just started to learn SQL: [your SQL query].

exercise 1

Take your first data snapshot

5 min

Just to reiterate how to run your SQL queries, you need to

  • paste the query into your editor by appending it to the bottom of your existing queries

  • highlight your query

  • hit RUN at the top right or use Control/Command + Enter

If you ever do get a little lost, just scroll back up and refer to these steps here or the guidance in the Environment setup module.

Let’s start with this. Paste the query below by appending it to the bottom of your existing queries.

SELECT * FROM orders
ORDER BY order_date
LIMIT 10

You're asking: show me the first 10 orders, chronologically. Scroll through the results. Before you do any analysis, answer these three questions in your head:

  1. What time period does this data cover?

  2. Which columns would matter most to Sarah?

  3. Does anything look unusual in the data?

Now run a proper baseline summary: (we’ve already done a quick sense check before on the total number of rows, minimum and maximum dates, and the total revenue, remember?)

SELECT
  COUNT(*)                    AS total_orders,
  MIN(order_date)             AS period_start,
  MAX(order_date)             AS period_end,
  ROUND(SUM(revenue), 2)      AS total_revenue,
  ROUND(AVG(revenue), 2)      AS avg_order_value
FROM

In five lines, you now know: how many orders exist, what period they cover, total revenue, and average order value. This is your baseline. Every other number this week gets measured against it.

The AI move: paste your baseline result into Copilot, Claude, or ChatGPT and ask: "I'm running a Q1 sales review and this is my baseline. What would a Head of Commerce want to understand next, in priority order?" Save the response. You'll use it this week.

Pro Tip: if at any point you do not understand a query, simply ask AI to explain. Use this prompt: “Explain the following SQL query to me step-by-step, like I’m an analyst who’s just started to learn SQL: [your SQL query].

exercise 1

Take your first data snapshot

5 min

Just to reiterate how to run your SQL queries, you need to

  • paste the query into your editor by appending it to the bottom of your existing queries

  • highlight your query

  • hit RUN at the top right or use Control/Command + Enter

If you ever do get a little lost, just scroll back up and refer to these steps here or the guidance in the Environment setup module.

Let’s start with this. Paste the query below by appending it to the bottom of your existing queries.

SELECT * FROM orders
ORDER BY order_date
LIMIT 10

You're asking: show me the first 10 orders, chronologically. Scroll through the results. Before you do any analysis, answer these three questions in your head:

  1. What time period does this data cover?

  2. Which columns would matter most to Sarah?

  3. Does anything look unusual in the data?

Now run a proper baseline summary: (we’ve already done a quick sense check before on the total number of rows, minimum and maximum dates, and the total revenue, remember?)

SELECT
  COUNT(*)                    AS total_orders,
  MIN(order_date)             AS period_start,
  MAX(order_date)             AS period_end,
  ROUND(SUM(revenue), 2)      AS total_revenue,
  ROUND(AVG(revenue), 2)      AS avg_order_value
FROM

In five lines, you now know: how many orders exist, what period they cover, total revenue, and average order value. This is your baseline. Every other number this week gets measured against it.

The AI move: paste your baseline result into Copilot, Claude, or ChatGPT and ask: "I'm running a Q1 sales review and this is my baseline. What would a Head of Commerce want to understand next, in priority order?" Save the response. You'll use it this week.

Pro Tip: if at any point you do not understand a query, simply ask AI to explain. Use this prompt: “Explain the following SQL query to me step-by-step, like I’m an analyst who’s just started to learn SQL: [your SQL query].

exercise 2

Find out where the business actually lives

5 min

exercise 2

Find out where the business actually lives

5 min

exercise 3

Write your first analytical filter

5 min

exercise 3

Write your first analytical filter

5 min

Go Deeper

Check out some FREE Maven Analytics resources below; it takes two seconds to create an account and we won’t even ask for your credit card details, I promise! Have a look around.

  1. Data Playground: Here are 68 free datasets that you can download to practice you skills

  2. ChatGPT for Data Analytics: The whole course is free from start to finish. It has a specific chapter on ChatGPT for SQL, but also covers in detail ChatGPT for Excel, Google Sheets, Power BI and Python (just in case you want to learn something else as well)

  3. MySQL for Data Analysis: Great for Analysts or BI professionals looking to quickly retrieve or analyse data stored in relational database systems

If you've already tested our platform and you know you're ready to take your learning to the next level now, sign up for your Pro account here. Or even better, go for our best value deal and get your lifetime access!

Sign up for your Pro account here

Are you ready to take your learning to the next level?

Go Deeper

Check out some FREE Maven Analytics resources below; it takes two seconds to create an account and we won’t even ask for your credit card details, I promise! Have a look around.

  1. Data Playground: Here are 68 free datasets that you can download to practice you skills

  2. ChatGPT for Data Analytics: The whole course is free from start to finish. It has a specific chapter on ChatGPT for SQL, but also covers in detail ChatGPT for Excel, Google Sheets, Power BI and Python (just in case you want to learn something else as well)

  3. MySQL for Data Analysis: Great for Analysts or BI professionals looking to quickly retrieve or analyse data stored in relational database systems

If you've already tested our platform and you know you're ready to take your learning to the next level now, sign up for your Pro account here. Or even better, go for our best value deal and get your lifetime access!

Sign up for your Pro account here

Are you ready to take your learning to the next level?

Looking forward to Tomorrow

Looking forward to Tomorrow

© Maven Analytics, LLC | All Rights Reserved

© Maven Analytics, LLC | All Rights Reserved

© Maven Analytics, LLC | All Rights Reserved