Skip to content

SQLUndergraduate courses

SQL — Introduction to Database Queries

Get your data out of the database and into your analysis — SELECT, filtering, joins and subqueries, taught on a real airline data set.

  • Introductory
  • 4 weeks
  • Approx. 15 hours per week
  • 3 semester hours
Data Science and Analytics — full setOne of the courses you can pick in this set. This course and 10 others in one payment, $250 less than buying them separately. You choose each start date later.$6,900

About this course

SQL, the structured query language, is what pulls data from the various tables in a database and assembles it in a format amenable to statistical analysis or review. This course builds both halves of that: a conceptual understanding of how a relational database differs from the flat file you are probably used to, and the practical query skills to get what you want out of one. The emphasis throughout is on structuring a query for extraction — it is not a course in designing databases, and it is not a course in big data methods.

Who this course is for

Beginners in data science who need to learn how to extract data from their relational databases — analysts who can do the statistics once the data is in front of them, but who currently have to ask somebody else to fetch it.

What you will learn

8 outcomes

By the end of this course, you will be able to:

  • Understand the relational database file model, and how it differs from a flat file
  • Load MySQL and read in .csv data
  • Query a database to obtain the data you want
  • Incorporate functions in queries
  • Add filtering to queries
  • Join tables
  • Perform subqueries
  • Understand the principles of an efficient SQL database

Week by week

4-Week curriculum overview

This curriculum is identical across all start dates. Expand a week to explore the topics covered.

Weeks
4
Your week
Approx. 15 hours
Level
Introductory
Getting startedWeek 1
  • Flat files — the spreadsheet model
  • Relational databases (RDBMS), and how a table compares with an R data frame
  • MySQL
  • Reading in .csv data
  • Introducing the airline data set
  • A preview of the SQL commands
  • Simple queries against the airline data — SELECT … FROM … LIMIT …
Basic SQL procedures and functionsWeek 2
  • Functions in queries
  • Aliases for column headers
  • Operations on tables versus operations on results
  • The WHERE clause
  • GROUP BY and ORDER BY
  • HAVING
  • Wrangling dates
Joining tables and subqueriesWeek 3
  • JOIN — left, right and cross
  • Table aliases
  • Subqueries
Efficient SQL databasesWeek 4
  • Indices
  • EXPLAIN
  • Keys — primary, unique and foreign
  • UPDATE
  • INSERT
  • CREATE TABLE
  • ALTER TABLE

Instructors

Expert-Led Guidance

Each cohort is led by dedicated instructors and assistant teachers who actively lead weekly discussions, provide personalized feedback and grade your assignments.

  • Dr. Ben Baumer

    Dr. Ben Baumer is the Director of the Statistical & Data Sciences Program at Smith College, and an Assistant Professor in the Statistical & Data Sciences Program. He is a data scientist — his research and teaching is focused on extracting meaning from data. This interest is informed by both his graduate work, which focused on discrete mathematics and theoretical computer science, and his professional experience, where he served as the Statistical Analyst for the New York Mets from 2004 to 2012. Having extensive experience and training in mathematics, computer science, and statistics, Ben enjoys the interplay between these three fields, particularly in data science and network science. Ben is also knowledgeable about sabermetrics, sports analytics, applied statistics, statistical modeling, analysis of algorithms, combinatorial optimization, data visualization, graph theory, and combinatorics.

Before you start

What you need to know first

Familiarity with Excel, and a basic knowledge of vectors and matrices.

Course Format & Schedule

This is a 4-week, 100% online, asynchronous course.

  • No mandatory live sessions: Log in and complete your work at times that fit your schedule.
  • Weekly Releases: At the start of each week, you will receive new lecture materials and answer keys for the previous week's exercises.
  • Interactive Community: Work through exercises, submit assignments, and engage with your instructor and peers via a private discussion board.
Homework

Short-answer questions testing conceptual understanding, and guided data wrangling projects using SQL, alongside practice exercises and assigned readings.

Texts

Step by step SQL instructions will be supplied in the course. The required text for this course is Modern Data Science with R. Note: The sections of the book we will use deal almost exclusively with SQL, although they will have occasional references to R. Lack of knowledge of R will not impede you in this course.

Software

We will use the MySQL database. You will be provided with access to an online SQL editor (runs in a browser). No need to install any other software for the course.

Course dates

2026

  • 11/02/2026to12/02/2026

    Instructors: Dr. Ben Baumer

  • 12/07/2026to01/04/2027

    Instructors: Dr. Ben Baumer

  • 10/05/2026to11/05/2026

    Instructors: Dr. Ben Baumer

    Enrollment closed

Refund policy

Refund: $550 before start, $325 until day 7, none after. Date changes: first one free, then $25 each, until day 7. Full terms

FAQ

The text is a book about R. Do I need to know R?This course

No. Only the SQL sections of the book are used, and while they mention R here and there, nothing in the course requires you to write any. R turns up once more as a comparison in week one, because a database table and an R data frame are close enough that the analogy is worth drawing.

Does this cover designing a database, or big data tools?This course

Neither, deliberately. The course is about structuring queries to get data out. Week four looks at indices, keys and EXPLAIN so that you can tell why a query is slow and write one that is not — that is as close to database design as it goes, and big data platforms are a separate subject.

Is there a money-back or satisfaction guarantee?Every course

Before your course starts, you get back what you paid minus a $100 processing fee. After it starts, until the deadline, which is the end of day 7 after the start date (for some courses, the end of the 10th of the month the course starts instead), you get back 50% of what you paid. After the deadline there is no refund. To ask, use the withdrawal form in your account or email support@learnstatistics.org. A person reviews every request.

Can I transfer to a later start date or withdraw after the course begins?Every course

Yes. You can move to another start date of the same course yourself, from My learning, until its move deadline (by default the end of day 7 after the start date). The first move of each course is free, and each later one costs $25. Withdrawing follows the refund rules above: 50% of what you paid until the deadline, and no refund after it. Moving does not restart the refund deadline: it is based on the earlier of the date you first bought and your new date.

How do I ask for a refund, and how long does it take?Every course

Use the withdrawal form in your account, or email support@learnstatistics.org. A person reviews every request: we reply within 2 business days and confirm the outcome within 5. Approved refunds go back to the card you paid with and usually arrive within 5 to 10 business days. The course then leaves your account and your classroom.

What if the course is cancelled?Every course

If we cancel your session, you choose: a full refund with no processing fee, or a free move to the next available date. The $25 fee for moving dates yourself is never refunded.

Who teaches the course?Every course

Each cohort is led by dedicated instructors and assistant teachers who actively lead weekly discussions, provide personalized feedback and grade your assignments. The instructor for each start date is listed on the course page.

Something not answered here? Ask us before you book — and the terms set out what a purchase covers.

Credit, and where it counts

This course carries a verified figure of 3 semester hours. A credit recommendation from the American Council on Education says what a course is worth; the institution receiving it decides whether to award it.

Anyone can take this subject: there is no application, and you do not have to be studying at a university. It also counts toward a degree at Thomas Edison State University in Trenton, New Jersey, which decides what to award for it. The course is taught online, so you take it the same way in New Jersey or anywhere else. The full position — including the limits each university publishes is on its own page, and worth reading before you buy.