Compare

The 8 Best SQL Courses for Data Analysts, Ranked

By Owen Middleton · Updated November 2026 · We ran the examples on PostgreSQL 17

Start with the DataLemur SQL Tutorial: it is free, and we give it 10 of 10 on our five analyst job tests. In 33 text lessons, you go from GROUP BY and outer joins to date functions, CTEs and window functions, and you finish with a case study on Instacart order data.

Pay for DataCamp Associate Data Analyst in SQL if you have never written code and you want one guided track with videos. We give it 10 of 10 too, and you pay $35 a month for Premium, or $28 a month billed annually.

Take the ThoughtSpot SQL Tutorial if you want three analysis case studies for free, with no account, and you will check your answers yourself.

SQLMaxx Learn is our own course, and we used the five analyst tests on it as on the other seven: it is at rank 3 with ThoughtSpot, with 9 of 10 points.

Our take. If you want an analyst job and do not want to pay yet, we would start at the Basic level of DataLemur's tutorial. Make a free account on the first day: with no account, you see the output of your query, but you get no grade. The two courses at rank 1 are different in cost and format: DataLemur gives free text lessons, and DataCamp gives a paid track with videos. If you will pay, we would pay for DataCamp's track ($28 a month, billed annually): you get 39 hours from your first query to window functions, and two bonus projects, one of them on motorcycle part sales.

SQL courses for data analysts compared

The 8 best SQL courses for data analysts
Rank Course Best for Price Score JoinsCleanDatesMulti-stepBusiness
1 DataCamp Associate Data Analyst in SQLhow we know One paid track, if you have never coded $35 a month, or $28 billed annually 10 / 10 22222
1 DataLemur SQL Tutorialhow we know Our pick: free lessons, linked to interview questions Tutorial free; Premium $15 a month 10 / 10 22222
3 ThoughtSpot SQL Tutorialhow we know Free case studies, with no account Free 9 / 10 22212
3 SQLMaxx LearnWe make it A grade on every query, free Free 9 / 10 22221
5 LearnSQL.com SQL for Data Analysishow we know Northwind reports; you pay one time $156 for lifetime access 7 / 10 21121
6 Dataquest SQL Skills for Data Analysishow we know Three guided projects; no date lessons $49 a month or $588 a year 6 / 10 11022
7 Google Data Analytics Certificatehow we know Full analyst program; SQL is one tool $49 a month after a 7-day trial 4 / 10 11002
7 Udacity SQL for Data Analysishow we know Short free course; no CTEs, no projects Free 4 / 10 11110

If you do not need date work, you get the same top of the list: DataCamp and DataLemur are at rank 1 with 8 of 8 points, and ThoughtSpot and SQLMaxx Learn are at rank 3.

The SQL courses for data analysts, one by one

1. DataCamp Associate Data Analyst in SQL

Best for a first track, if you have never written code

  • Price: Premium, $35 a month, or $28 a month billed annually
  • Free: The first chapter of each course, with a free account
  • Size: 11 courses and 2 bonus projects; DataCamp gives 39 hours
  • Checks your query: In our test, DataCamp accepted a right answer in another row order and rejected a wrong one
  • Limit: In 2 of the 11 courses, DataCamp says that there is "no coding involved", and you need Premium for the certification. In the two free chapters that we did, you mostly complete or fix a query that DataCamp gives.

how we know

Score: 10 of 10 points.

Go to DataCamp Associate Data Analyst in SQL

1. DataLemur SQL Tutorial

Our pick: free analyst lessons, linked to real interview questions

  • Price: The tutorial is free; Premium is $15 a month or $60 a year, for more interview questions
  • Free: All 33 lessons, and 45 of the 46 practice problems that we found, with no account. You sign in to use Submit.
  • Checks your query: In our test, DataLemur rejected a right answer in another row order and accepted the same rows in ascending order.
  • Tip: If you see "Mismatched" and your rows look right, sort them in ascending order.
  • Limit: Text lessons only, with no video, and no certificate.

how we know

Score: 10 of 10 points.

Go to DataLemur SQL Tutorial

3. ThoughtSpot SQL Tutorial

Best for free case studies, with no account

  • Price: Free; all 52 lessons and the editor on each lesson page, with no account
  • Case studies: Three Yammer cases, such as "A Drop in Engagement"; ThoughtSpot calls the data of two of them fake
  • Database: In its lesson editor, you run SQLite, but in some lessons, ThoughtSpot points you to PostgreSQL
  • Former name: The Mode SQL Tutorial
  • Limit: You get no grade: you compare your query with the given answer yourself. We also found no lesson on CTEs.

how we know

Score: 9 of 10 points.

Go to ThoughtSpot SQL Tutorial

3. SQLMaxx Learn

Made by SQLMaxx

Best for a grade on every query, from your first SELECT to running totals, free

  • Price: Free
  • Free: All 66 lessons and 615 practice problems; you need no account to start
  • Marked as ours: We made this course, so we gave it no easier reading of the analyst tests than the other seven.
  • Strength: You get a grade on each query in 615 problems, from outer joins to period-over-period reports.
  • Limit: You get no case study or project, so we give it 1 of 2 on business data.

Score: 9 of 10 points.

Go to SQLMaxx Learn

5. LearnSQL.com SQL for Data Analysis

Best for reports on the Northwind database, if you want to pay one time

  • Price: $156 for lifetime access to this track, or $149 for lifetime access to all 82 courses
  • Free: A free trial; in each course outline that we read, the first two chapters
  • Size: Four courses, about 48 hours
  • Before you pay: Look at the plan for all 82 courses first. You pay less for it than for this track.
  • Limit: We found no lessons on date or string functions, and no project.

how we know

Score: 7 of 10 points.

Go to LearnSQL.com SQL for Data Analysis

6. Dataquest SQL Skills for Data Analysis

Best for three guided projects, if you do not need date work

  • Price: Premium, $49 a month or $588 a year
  • Free: The introductory courses, and some practice problems and guided projects, with a free account
  • Size: Five courses and 3 projects; Dataquest gives 21 hours
  • Limit: We found no lessons on dates or NULL values, and no outer join by name.

how we know

Score: 6 of 10 points.

Go to the Dataquest course

7. Google Data Analytics Certificate

Best for a full analyst program, with SQL as one tool of several

  • Price: $49 a month after a 7-day free trial, in the U.S. and Canada; financial aid is available
  • Free: You buy the Certificate experience for the materials; some courses have a "Full Course, No Certificate" option
  • Size: 9 courses; Google gives less than 6 months at under 10 hours a week
  • Limit: In SQL courses 4 and 5, we found no CTEs, window functions or date functions.

how we know

Score: 4 of 10 points.

Go to Google Data Analytics Certificate

7. Udacity SQL for Data Analysis

Best for a short, free course of videos and quizzes

  • Price: Free
  • Free: The whole course, but you need a Udacity account to open the lessons
  • Size: Seven SQL lessons and no projects
  • Limit: No certificate, no project and no mentor; we also found no CTEs and no outer joins in the outline.

how we know

Score: 4 of 10 points.

Go to Udacity SQL for Data Analysis

Where is the best place to learn SQL for data analysis?

  • You want the highest score, free: the DataLemur SQL Tutorial.
  • You have never coded and will pay for one path: DataCamp Associate Data Analyst in SQL.
  • You use Excel and must now make reports in SQL: do DataLemur's lessons, then the Instacart case study in its SQL tutorial.
  • You want case studies with no account: the ThoughtSpot SQL Tutorial.
  • You are a beginner and want a grade on every query, with no account: SQLMaxx Learn (rank 3), a SQL course for beginners.
  • You are new to SQL and want to begin with joins: read the Joining Multiple Tables lesson and how GROUP BY works: an analyst uses both in almost every report.
  • You want to know which SQL topics an analyst needs: the SQL skills needed for data analysts.
  • SQL for data engineering: the best SQL course for data engineers.

Questions about SQL courses for data analysts

What SQL courses are recommended for data analysts?

The DataLemur SQL Tutorial and DataCamp Associate Data Analyst in SQL, both at rank 1 with 10 of 10 on our tests. We recommend DataLemur first, because every lesson is free. Pick DataCamp if you want a paid track with videos, at $28 a month billed annually. We see the largest difference on two tests, clean data and dates: on each, we give 2 of 2 to only four of the eight courses.

Which SQL is good for data analysts?

If you know the database of your target employer, learn the SQL of that database. If not, start with PostgreSQL: you can run most SELECT queries the same way in the other databases. In three of the eight courses, you use PostgreSQL: DataCamp, DataLemur and SQLMaxx Learn. On DataLemur, you can also choose MySQL on 23 of the 54 listed questions. Google uses BigQuery, and LearnSQL.com lets you pick from five databases for one of its courses. On ThoughtSpot, you run SQLite in the lesson editor, but in some lessons, ThoughtSpot points you to PostgreSQL. For Dataquest and Udacity, we found no database name.

Is there a free SQL course for data analysts?

Yes, four. You get every lesson free on DataLemur, ThoughtSpot and SQLMaxx Learn, and you can start with no account. The Udacity course is free too, but you need an account to open the lessons. Of the four, DataLemur has the highest score, 10 of 10. For a grade on your query, you need a free DataLemur account; on ThoughtSpot, you check your answers yourself.

Which SQL courses for data analysts give a certificate?

Five of the eight. Of these, you get the certificate free only from SQLMaxx Learn, with a free account. For DataCamp, LearnSQL.com, Dataquest and Google, you pay for the full course before you get it. We found no certificate for the DataLemur, ThoughtSpot or Udacity courses. We do not score certificates on this page.

How many hours do the SQL courses for data analysts take?

From 21 hours to some months, where the company gives a time. Dataquest gives 21 hours, DataCamp gives 39 hours, and LearnSQL.com gives about 48 hours. For its full program, Google gives less than 6 months at under 10 hours a week; SQL is one part of it. For DataLemur, ThoughtSpot and Udacity, we found no time on the course pages, and we give no time for SQLMaxx Learn.

Is SQL still worth learning in 2026?

Yes. In a 365 Data Science study of 855 US data analyst job posts on Indeed, employers asked for SQL in 52.9% of the posts. The authors call SQL "the most sought-after programming language for data analysts".

Source: 365 Data Science, Indeed study

How we checked the SQL courses for data analysts

We paid for none of the eight.

To check these eight analyst courses, we read their public pages and opened every free part that we could open with no account. With a free account, we also did lessons on DataCamp and submitted a practice question on DataLemur.

We found no count of the SQL topics in data analyst job posts. In the studies that we found, the authors count the posts in which employers ask for SQL, but not the SQL topics in them. So for each test, we name the evidence that we have, and we say where it is weak. The topics inside each test are our choice. We use this evidence for the skill area, not for each topic.

We count a topic only when the course pages name it. We do not count a near topic: for example, HAVING is not GROUP BY. If we found no topic list, we give 0. We give 0, 1 or 2 points on each test. We give all five tests the same weight, because we found no evidence that one skill is more important than another.

O*NET, the US occupation records, has no occupation named "Data Analyst". So we use two near occupations: Data Scientists for the task about clean data, and Business Intelligence Analysts for the task about reports.

Combine and summarize tables. 2 if we found outer joins (for example LEFT JOIN) and GROUP BY on the course pages. 1 if we found only one of the two, or joins with no outer join. 0 if we found no joins and no GROUP BY. Evidence: in his SQL interview guide, Nick Singh, who made DataLemur, names "SQL joins" as an interview topic. In the guide, he explains LEFT JOIN, and he gives a GROUP BY example from a Tesla interview question. DataLemur is one of the courses on this page. We have this evidence from one interview guide, not from job posts. (DataLemur, SQL interview guide)

Clean data. 2 if we found all three on the course pages: NULL values, CASE, and string or type functions. 1 if we found one or two of the three. 0 if we found none. Evidence: for Data Scientists, a task in O*NET is "Clean and manipulate raw data using statistical software". In the same guide, Nick Singh writes that in a take-home challenge, you can get data "filled with missing data or nulls". This evidence is weak: O*NET does not name SQL in the task, and we chose CASE and the string and type functions ourselves. (O*NET 15-2051.00) (DataLemur, SQL interview guide)

Work with dates and time periods. 2 if we found date functions and analysis by period on the course pages. Examples of date functions are DATE_TRUNC, EXTRACT and INTERVAL. Examples of analysis by period are period over period, running totals and time series. 1 if we found one of the two. 0 if we found neither. Evidence: for Business Intelligence Analysts, a task in O*NET is "Generate standard or custom reports summarizing business, financial, or economic data for review by executives, managers, clients, and other stakeholders". In our view, analysts often make a report for a week, a month or a quarter. Nick Singh also lists "The most common date/time functions to know for SQL interviews". We found no count of date skills in job posts. (O*NET 15-2051.01) (DataLemur, SQL interview guide)

Multi-step queries. 2 if we found subqueries, CTEs (WITH) and window functions on the course pages. 1 if we found subqueries and one of the other two. 0 in all other cases. Evidence: Nick Singh names "window functions" as an interview topic. For subqueries and CTEs, he writes: "Often, SQL interviews have a multi-part solution, consisting of multiple joins, unions, subqueries, and CTEs." We have this evidence from one interview guide, not from job posts. (DataLemur, SQL interview guide)

Analyst work on business data. 2 if you practice on business data, and we found at least one case study or project on the course pages. 1 if you practice on business data, but we found no case study or project. 0 in all other cases. Business data is a set of tables about the sales, orders, customers, staff or product use of a company. The data can be real or made up. Evidence: the O*NET task in the "Work with dates and time periods" test is about reports on business data. Nick Singh also names "your ability to write SQL queries to answer business questions". (O*NET 15-2051.01) (DataLemur, SQL interview guide)

We give the same rank to courses with the same total. Inside a shared rank, we list the other courses in alphabetical order and our own course last.

Without the "Work with dates and time periods" test, you get this order: 1. DataCamp Associate Data Analyst in SQL and DataLemur SQL Tutorial (8 of 8); 3. ThoughtSpot SQL Tutorial and SQLMaxx Learn (7 of 8); 5. Dataquest SQL Skills for Data Analysis and LearnSQL.com SQL for Data Analysis (6 of 8); 7. Google Data Analytics Certificate (4 of 8); 8. Udacity SQL for Data Analysis (3 of 8).

ThoughtSpot SQL Tutorial: Clean data, 2 of 2. For CASE, see the citation "ThoughtSpot SQL topics, note 5": ThoughtSpot has a lesson on CASE.

LearnSQL.com SQL for Data Analysis: Multi-step queries, 2 of 2. For window functions, see the citation "LearnSQL.com content": the track has a course named Window Functions.

SQLMaxx Learn, our own course: Combine and summarize tables, 2 of 2. "LEFT JOIN and RIGHT JOIN" (lesson 18), "FULL OUTER JOIN" (lesson 19) and "GROUP BY" (lesson 14). Clean data, 2 of 2. "NULL Semantics and IS NULL" (lesson 5), "CASE WHEN Expressions" (lesson 16), "String Functions (LENGTH, UPPER, LOWER, TRIM, SUBSTRING)" (lesson 35) and "Literal Values, Data Types, and Type Casting" (lesson 4). Work with dates and time periods, 2 of 2. Date functions: "Date Truncation and Extraction" (lesson 33) and "Date Arithmetic and Intervals" (lesson 34). Analysis by period: "Period-over-Period Analysis" (lesson 56), "Grouping by Date Periods" (lesson 57) and "Running Totals and Cumulative Metrics" (lesson 64). Multi-step queries, 2 of 2. "Scalar Subqueries" (lesson 24), "Common Table Expressions (CTEs)" (lesson 30) and "Window Functions Introduction (OVER, PARTITION BY)" (lesson 38). Analyst work on business data, 1 of 2. In 63 of the 66 lessons, you use the tables of three made-up companies. They are an online store, a staff and pay system, and a web product. In 580 of the 615 problems, you use these tables. You get no case study or project.

We did not score these courses on this page: SQLBolt, SQLZoo and Khan Academy, because we scored them on our list of free SQL courses; Codecademy Learn SQL, Coursera SQL for Data Science and the Udemy Complete SQL Bootcamp, because we scored them for all learners on our page on the best SQL courses; Maven Analytics Advanced SQL Querying; and courses on YouTube.

For the method behind these tests, and for how we date each fact, read our page on how we test courses for analysts.

DataCamp Associate Data Analyst in SQL

We list the facts on the card of the course first: price, what is free, account, size, query checks, dialect and certificate. Then we list the facts for the five analyst tests, in the order of the table columns, and then the other facts that this page uses.

DataCamp

DataLemur SQL Tutorial

We list the facts in the same order as in the note on DataCamp Associate Data Analyst in SQL.

DataLemur

ThoughtSpot SQL Tutorial

We list the facts in the same order as in the note on DataCamp Associate Data Analyst in SQL.

ThoughtSpot

LearnSQL.com SQL for Data Analysis

We list the facts in the same order as in the note on DataCamp Associate Data Analyst in SQL.

LearnSQL.com

Dataquest SQL Skills for Data Analysis

We list the facts in the same order as in the note on DataCamp Associate Data Analyst in SQL.

Dataquest

Udacity SQL for Data Analysis

We list the facts in the same order as in the note on DataCamp Associate Data Analyst in SQL.

Udacity

Google Data Analytics Certificate

We list the facts in the same order as in the note on DataCamp Associate Data Analyst in SQL.

Google Data Analytics Certificate

  • Google Data Analytics Certificate price, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate free use, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate account, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate content, checked November 2, 2026 — source · our notes
  • Google Data Analytics Certificate query check, checked October 16, 2026 — source · our notes
  • Google Data Analytics Certificate SQL engines, checked October 16, 2026 — source · our notes
  • Google Data Analytics Certificate certificate, checked October 16, 2026 — source · our notes
  • Google Data Analytics Certificate strength, checked October 16, 2026 — source · our notes
  • Google Data Analytics Certificate limit, checked October 16, 2026 — source · our notes
  • Google Data Analytics Certificate SQL topics, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate content, note 2, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate content, note 3, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate content, note 4, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate SQL topics, note 2, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate SQL topics, note 3, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate content, note 5, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate content, note 6, checked October 15, 2026 — source · our notes
  • Google Data Analytics Certificate SQL topics, note 4, checked November 2, 2026 — source · our notes

We do not score the price or the query checks of a course on this page. They are not job skills, and with a score for either one, we would favor our own course: you use SQLMaxx Learn free, and you get a grade on each query. We score price and checks on our page on which SQL course is best.