SQL for Data Science with R
Keep adding new skills with 10,000+ programs for $239 (usually $399). Save now.
SQL for Data Science with R
This course is part of multiple programs.
Instructor: Rav Ahuja
28,934 already enrolled
Included with
Ask Coursera
192 reviews
Recommended experience
192 reviews
Recommended experience
What you'll learn
Create and access a database instance on the cloud
Compose and execute basic SQL statements - SELECT, INSERT, UPDATE, DELETE, CREATE, DROP
Construct SQL statements to filter, sort, group results, use built-in functions, compose nested queries, access multiple tables
Analyze data from Jupyter using R and SQL by combining SQL and R skills to query real-world datasets
Skills you'll gain
Tools you'll learn
Details to know
See how employees at top companies are mastering in-demand skills
Build your subject-matter expertise
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate
There are 6 modules in this course
Much of the world's data resides in databases. SQL (or Structured Query Language) is a powerful language which is used for communicating with and extracting data from databases. A working knowledge of databases and SQL is a must if you want to become a data scientist.
The purpose of this course is to introduce relational database concepts and help you learn and apply foundational knowledge of the SQL and R languages. It is also intended to get you started with performing SQL access in a data science environment. The emphasis in this course is on hands-on and practical learning. As such, you will work with real databases, real data science tools, and real-world datasets. Through a series of hands-on labs, you will practice building and running SQL queries. You will also learn how to access databases from Jupyter notebooks using SQL and R. No prior knowledge of databases, SQL, R, or programming is required. Anyone can audit this course at no charge. If you choose to take this course and earn the Coursera course certificate, you can also earn an IBM digital badge upon successful completion of the course.
Structured Query Language, or SQL, provides a standard language for selecting and manipulating data in a relational database. Understanding SQL is a foundational skill that you must have when applying data science principles in R because SQL is the key to helping you unlock insights about the information stored deep inside relational databases. In this module, you will learn some basic SQL statements and practice them hands-on on a live database.
What's included
5 videos2 readings2 assignments3 app items2 plugins
5 videos•Total 17 minutes
- Welcome to SQL for Data Science•5 minutes
- SELECT Statement•4 minutes
- COUNT, DISTINCT, LIMIT•2 minutes
- INSERT Statement•3 minutes
- UPDATE and DELETE Statements•3 minutes
2 readings•Total 9 minutes
- Course Overview •4 minutes
- Module Summary: Getting Started with SQL•5 minutes
2 assignments•Total 36 minutes
- Graded Quiz: Getting Started with SQL•21 minutes
- Practice Quiz: Getting Started with SQL •15 minutes
3 app items•Total 70 minutes
- Hands-on Lab: Simple SELECT Statements•20 minutes
- Hands-on Lab: COUNT, DISTINCT, LIMIT•30 minutes
- Hands-on Lab: INSERT, UPDATE, and DELETE•20 minutes
2 plugins•Total 20 minutes
- SELECT statement examples•5 minutes
- SQL Cheat Sheet: Basics - SELECT, INSERT, UPDATE, DELETE, COUNT, DISTINCT, LIMIT•15 minutes
In this module, you will explore the fundamental concepts behind databases, tables, and the relationships between them. You will then create an instance of a database, discover SQL statements that allow you to create and manipulate tables, and then practice them on your own live database.
What's included
6 videos3 readings2 assignments3 app items2 plugins
6 videos•Total 26 minutes
- Introduction to Databases•4 minutes
- Relational Database Concepts•6 minutes
- Types of SQL statements (DDL vs. DML)•2 minutes
- CREATE TABLE Statement•4 minutes
- ALTER, DROP, and Truncate tables•4 minutes
- How to create a Database instance on Cloud•6 minutes
3 readings•Total 5 minutes
- Module Summary: Introduction to Relational Databases and Tables•2 minutes
- About this Optional Lesson•2 minutes
- [Optional] Hands-on Lab Using IBM Db2•1 minute
2 assignments•Total 31 minutes
- Graded Quiz: Introduction to Relational Databases and Tables•21 minutes
- Practice Quiz: Introduction to Relational Databases and Tables•10 minutes
3 app items•Total 150 minutes
- Hands-on Lab: CREATE, ALTER, TRUNCATE, DROP into Tables in MySQL using phpMyAdmin•60 minutes
- Hands-on Lab: Create and Load Tables using SQL Scripts•60 minutes
- Obtain IBM Cloud Feature Code and Activate Trial Account•30 minutes
2 plugins•Total 10 minutes
- Examples to CREATE and DROP tables•5 minutes
- SQL Cheat Sheet: CREATE TABLE, ALTER, DROP, TRUNCATE•5 minutes
In this module, you will learn how to use string patterns and ranges to search data and how to sort and group data in result sets. You will also practice composing nested queries and execute select statements to access data from multiple tables.
What's included
7 videos4 readings4 assignments4 app items5 plugins
7 videos•Total 31 minutes
- Using String Patterns and Ranges•4 minutes
- Sorting Result Sets•3 minutes
- Grouping Result Sets•4 minutes
- Built-in Database Functions•6 minutes
- Date and Time Built-in Functions•3 minutes
- Sub-Queries and Nested Selects•5 minutes
- Working with Multiple Tables•6 minutes
4 readings•Total 13 minutes
- Summary: Refining Your Results•5 minutes
- Summary: Functions, Multiple Tables, and Sub-queries•5 minutes
- About this Optional Lesson•2 minutes
- [Optional] Hands-on Lab Using IBM Db2•1 minute
4 assignments•Total 72 minutes
- Graded Quiz: Refining Your Results•21 minutes
- Graded Quiz: Functions, Multiple Tables, and Sub-Queries•21 minutes
- Practice Quiz: Refining Your Results•15 minutes
- Practice Quiz: Functions, Multiple Tables, and Sub-queries•15 minutes
4 app items•Total 240 minutes
- Hands-on Lab: String Patterns, Sorting and Grouping•60 minutes
- Hands-on Lab: Built-in functions•60 minutes
- Hands-on Lab: Sub-queries and Nested SELECTs•60 minutes
- Hands-on Lab: Working with Multiple Tables•60 minutes
5 plugins•Total 65 minutes
- Reading: Examples for String Patterns, Sorting, and Grouping•15 minutes
- Reading: Examples for Built-in Functions•15 minutes
- Reading: Examples for Sub Queries and Nested Queries•15 minutes
- Reading: Examples for Multiple Tables•15 minutes
- SQL Cheat Sheet: Intermediate - LIKE, ORDER BY, GROUP BY•5 minutes
In this module, you will learn the benefits of using R to connect to relational databases and how to persist R database objects in files. You’ll also learn some of the similarities between R data frames and relational databases, including how data types compare and when you must convert from one type to another to improve the effectiveness of your data analysis. Finally, you’ll learn different methods for connecting to a database from R.
What's included
10 videos3 readings4 assignments5 app items5 plugins
10 videos•Total 27 minutes
- Why use R with Relational Databases •2 minutes
- R Persistence Options•1 minute
- Terminology Comparison•2 minutes
- Mapping Data between R and RDBMS•2 minutes
- Database Design Considerations•3 minutes
- Connectivity Options•3 minutes
- Connecting with RJDBC •3 minutes
- Connectivity using ODBC•3 minutes
- RODBC in Detail •5 minutes
- Metadata Discovery •4 minutes
3 readings•Total 22 minutes
- Summary & Highlights: R and Relational Databases•10 minutes
- Summary & Highlights : Connecting to Databases from R•10 minutes
- About this Optional Lesson•2 minutes
4 assignments•Total 67 minutes
- Graded Quiz: R and Relational Databases•21 minutes
- Graded Quiz: Connecting to Databases from R•21 minutes
- Practice Quiz: R and Relational Databases•10 minutes
- Practice Quiz: Connecting to Databases from R•15 minutes
5 app items•Total 160 minutes
- Hands-on Lab: Review using Jupyter and R Dataframes•15 minutes
- Hands-on Lab: Accessing Your Database using RJDBC•60 minutes
- Hands-on Lab: Accessing Your Database with RSQLite•60 minutes
- [Optional] Hands-on Lab: Accessing Your Database using RJDBC with DB2•10 minutes
- [Optional] Hands-on Lab: Accessing your Database using RODBC with DB2•15 minutes
5 plugins•Total 75 minutes
- Cheat Sheet - R basics•15 minutes
- Reading: Example for Connecting with RJDBC using SQLite•15 minutes
- Reading: A Comprehensive Review of RSQLite•15 minutes
- CheatSheet - Connecting to Databases using R•15 minutes
- [Optional] Hands-on Lab: Create Db2 Service Credentials•15 minutes
In this module, you will learn the full process of accessing and querying databases using R. You’ll learn how to create the logical and physical model of the database and then implement the model by creating the physical database objects and loading them with data. Finally, you’ll examine an example of accessing and querying the database.
What's included
6 videos2 readings2 assignments2 app items2 plugins
6 videos•Total 18 minutes
- Working with Data •4 minutes
- Database Design and Data Preparation•3 minutes
- Creating Physical Database Objects•3 minutes
- Loading the Data•1 minute
- Querying Data (SQL SELECT)•4 minutes
- Analyzing the Data•3 minutes
2 readings•Total 7 minutes
- Summary and Highlights: Working with Database Objects using R •5 minutes
- About this Optional Lesson•2 minutes
2 assignments•Total 31 minutes
- Graded Quiz: Working with Database Objects using R•21 minutes
- Practice Quiz: Working with Database Objects using R•10 minutes
2 app items•Total 90 minutes
- Hands-on Lab: Creating and Querying Database Objects from R using RSQLite with SQLite•60 minutes
- [Optional] Hands-on Lab: Creating and Querying Database Objects from R using RODBC with DB2•30 minutes
2 plugins•Total 30 minutes
- Reading: Example for Creating and querying databases with SQLite using R•15 minutes
- CheatSheet- Creating Database Objects & Querying Data from R•15 minutes
In this assignment, you will be working with multiple real-world datasets for the Canadian Crop Data and Exchange Rates. You will be asked questions that will help you understand the data just as you would in the real world. You will be assessed on the correctness of your SQL queries and results.
What's included
1 reading1 assignment1 peer review5 app items2 plugins
1 reading•Total 2 minutes
- Congratulations & Next Steps•2 minutes
1 assignment•Total 50 minutes
- Final Exam•50 minutes
1 peer review•Total 60 minutes
- Option 2: Peer Graded - Final Project Submission and Evaluation•60 minutes
5 app items•Total 255 minutes
- Hands-on Lab: Practice Querying Real World Datasets using RSQLite with SQLite•60 minutes
- [Optional] Hands-on Lab: Practice Querying Real World Datasets using RODBC with DB2•30 minutes
- Lab for Final Project - Data Analytics for Canadian Crop Production Data Set•60 minutes
- [Optional] Jupyter Notebook with Problems for Peer Reviewed Assignment using RODBC with DB2•45 minutes
- Option 1: AI Graded - Final Project: Submission and Evaluation•60 minutes
2 plugins•Total 25 minutes
- Final Project Overview•20 minutes
- Reading: Final Project Submission Guidelines and Deliverables•5 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructor
Explore more from Data Analysis
- Status: Free Trial
- Status: Free Trial
- Status: Free Trial
Course
- Status: Free TrialL
Logical Operations
Specialization
Why people choose Coursera for their career
Learner reviews
- 5 stars
66.32%
- 4 stars
18.13%
- 3 stars
8.80%
- 2 stars
2.07%
- 1 star
4.66%
Showing 3 of 192
Reviewed on Apr 11, 2022
Very useful course for those who wants to learn SQL.
Reviewed on Feb 12, 2025
The content and pacing were excellent. I came into the course with plenty of PL/SQL experience, and left feeling like I had a strong foundation with how SQL works in R.
Reviewed on Mar 4, 2022
This skills in this course are easy to learn, the simplicity of the materials is what I like the most about IBM courses.
Frequently asked questions
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
When you enroll in the course, you get access to all of the courses in the Certificate, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
More questions
Financial aid available,
¹ Some assignments in this course are AI-graded. For these assignments, your data will be used in accordance with Coursera's Privacy Notice.
