SQL Fundamentals for R Users

SQL skills are crucial for any data analyst or data scientist position. Before you can perform any kind of analysis on a company’s data, you have to get that data, and that usually means interacting with SQL databases. Being able to work with SQL in the context of your primary coding language is also crucial for building and deploying new dashboards, models, etc.

This SQL Fundamentals for R Users course covers the basics of working with SQL, including writing simple queries with clauses like WHERE, GROUP BY, and HAVING, calculating summary statistics, and writing more complex, nested queries using subqueries. It also covers how to query SQLite databases using R and RSQLite, so that you can easily integrate your new SQL skills with your R programming.

Throughout the course, you’ll work with real-world jobs data as you practice writing SQL queries and calculating summaries. Then, you’ll put all your new skills to the test in a guided project that tasks you with analyzing data from the CIA World Factbook using SQLite and R, and generating visualizations of your results.

Like all of our courses, this course is completed interactively, and you'll be writing your code (SQL and R) right in your browser window.

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

  • Work with databases using SQL.
  • Explore and analyze data in SQL.
  • Work through the R SQLite workflow.



By creating an account you agree to accept our terms of use and privacy policy.

Learn SQL Fundamentals

Introduction to SQL

Learn the basics of SQL to explore a dataset.

Summary Statistics

Learn how to calculate summary statistics in SQL.

Group Summary Statistics

Learn how to compute statistics across groups.


Learn how to write complex, nested queries using subqueries.

Querying SQLite From R

Learn how to query a SQLite database from R.

Guided Project: Analyzing CIA Factbook Data Using SQLite and R

Practice the R SQLite workflow using CIA Factbook data.