Register today for our Generative AI Foundations course. Use code GenAI99 for a discount price of $99!
Skip to content
SQL – Introduction to Database Queries

SQL – Introduction to Database Queries

This course will teach you how to extract data from a relational database using SQL and merge data into a single file in R so that you can perform statistical operations.

Overview

The SQL (structured query language) programming language is often used to pull data from the various tables in a database and to assemble the data in a format amenable to statistical analysis or review.

The purpose of this course is to teach you how to extract data from a relational database using SQL so you can perform statistical operations. The focus is on structuring queries to extract structured data (not on building databases or methods of handling big data). This is an introductory course that will help you think “like” a relational database in order to manipulate matrices and vectors of data using SQL queries.

  • Introductory, Intermediate
  • 4 Weeks
  • Expert Instructor
  • Tuiton-Back Guarantee
  • 100% Online
  • TA Support

Learning Outcomes

After completing this course, you should be able to visualize how you need to manipulate a dataset in order to perform a desired calculation or answer a particular question. You should be able to understand relational database files, load MySQL and read in .csv data. You will learn how to write and filter queries, incorporate functions, perform subqueries and how to join tables.

  • Understand the relational database file model (as contrasted with the flat file)
  • Load MySQL and read in .csv data
  • Query databases to obtained desired data
  • Incorporate functions in queries
  • Add filtering to queries
  • Join tables
  • Perform subqueries
  • Understand the principles of efficient SQL databases

Who Should Take This Course

This course is meant for beginners in data science who need to learn how to extract data from their relational databases.

Our Instructors

Dr. Ben Baumer

Dr. Ben Baumer

Dr. Ben Baumer is the Director of the Statistical & Data Sciences Program at Smith College, and an Assistant Professor in the Program in Statistical & Data 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.

Course Syllabus

Week 1

Getting Started

  • Flat files (spreadsheet model)
  • Relational databases (RDBMS) [note: compare to dataframe in R]
  • MySQL
  • Read in .csv data
  • The airline data https://github.com/beanumber/airlines
  • Preview of SQL commands
  • Simple queries with the airline data – SELECT … FROM … LIMIT…

Week 2

Basic SQL Procedures and Functions

  • Functions in queries
  • Alias for column header
  • Operations on tables vs. operations on results
  • WHERE
  • GROUP BY and ORDER BY
  • HAVING
  • Wrangling dates – MySQL documentation str_to_date

Week 3

Joining Tables and Subqueries

  • JOIN (left, right, cross)
  • Table Aliases
  • Subqueries

Week 4

Efficient SQL Databases

  • Indices
  • EXPLAIN
  • KEYS (primary, unique, foreign)
  • UPDATE
  • INSERT
  • CREATE TABLE
  • ALTER TABLE

Class Dates

2024

03/08/2024 to 03/29/2024
Instructors:
07/12/2024 to 08/02/2024
Instructors:
11/08/2024 to 12/06/2024
Instructors: Dr. Ben Baumer

2025

03/14/2025 to 04/04/2025
Instructors:
07/11/2025 to 08/01/2025
Instructors:
11/14/2025 to 12/05/2025
Instructors:

Prerequisites

Familiarity with Excel, basic knowledge of vectors and matrices.

Karolis Urbonas
Susan Kamp
Stephen McAllister
Amir Aminimanizani
Elena Rose
Leonardo Nagata
Richard Jackson

Frequently Asked Questions

  • What is your satisfaction guarantee and how does it work?

  • Can I transfer or withdraw from a course?

  • Who are the instructors at Statistics.com?

Visit our knowledge base and learn more.

Register For This Course

SQL – Introduction to Database Queries

Additional Information

Organization of Course

This course takes place online at The Institute for 4 weeks. During each course week, you participate at times of your own choosing – there are no set times when you must be online. Course participants will be given access to a private discussion board. In class discussions led by the instructor, you can post questions, seek clarification, and interact with your fellow students and the instructor.

At the beginning of each week, you receive the relevant material, in addition to answers to exercises from the previous session. During the week, you are expected to go over the course materials, work through exercises, and submit answers. Discussion among participants is encouraged. The instructor will provide answers and comments, and at the end of the week, you will receive individual feedback on your homework answers.

Time Requirements

This is a 4-week course requiring 10-15 hours per week of review and study, at times of your choosing.

Homework

Homework in this course consists of short answer questions to test concepts and guided data wrangling projects using SQL.

In addition to assigned readings, this course also has practice exercises.

Course Text

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 MySQL programming language.

Course Fee & Information

Enrollment
Courses may fill up at any time and registrations are processed in the order in which they are received. Your registration will be confirmed for the first available course date unless you specify otherwise.

Transfers and Withdrawals
We have flexible policies to transfer to another course or withdraw if necessary.

Group Rates
Contact us to get information on group rates.

Discounts
Academic affiliation?  In most courses you are eligible for a discount at checkout.

New to Statistics.com?  Click here for a special introductory discount code.

Invoice or Purchase Order
Add $50 service fee if you require a prior invoice, or if you need to submit a purchase order or voucher, pay by wire transfer or EFT, or refund and reprocess a prior payment.

Options for Credit and Recognition

This course is eligible for the following credit and recognition options:

No CreditYou may take this course without pursuing credit or a record of completion.

Mastery or Certificate Program Credit
If you are enrolled in mastery or certificate program that requires demonstration of proficiency in this subject, your course work may be assessed for a grade.

CEUs and Proof of Completion
If you require a “Record of Course Completion” along with professional development credit in the form of Continuing Education Units (CEU’s), upon successfully completing the course, CEU’s and a record of course completion will be issued by The Institute upon your request.

ACE CREDIT | College Credit
This course has been evaluated by the American Council on Education (ACE) and is recommended for college credit.  For recommendation details (level, and number of credits), please see this page. Please note that the decision to accept specific credit recommendations is up to the academic institution accepting the credit.

ACE Digital Badge
Courses evaluated by the American Council on Education (ACE) have a digital badge available for successful completion of the course.

INFORMS-CAP
This course is recognized by the Institute for Operations Research and the Management Sciences (INFORMS) as helpful preparation for the Certified Analytics Professional (CAP®) exam and can help CAP® analysts accrue Professional Development Units to maintain their certification.

Supplemental Information

Literacy, Accessibility, and Dyslexia

At Statistics.com, we aim to provide a learning environment suitable for everyone. To help you get the most out of your learning experience, we have researched and tested several assistance tools. For students with dyslexia, colorblindness, or reading difficulties, we recommend the following web browser add-ons and extensions:

 

Chrome

 

Firefox

 

Safari

  • Navidys (for colorblindness, dyslexia, and reading difficulties)
  • HelperBird for Safari (for colorblindness, dyslexia, and reading difficulties)

Miscellaneous

There is no additional information for this course.

Register For This Course

SQL – Introduction to Database Queries