
Explore the fundamentals of SQL, the structured query language that is the industry standard for creating, reading, manipulating, and changing data in databases for analysts and data scientists.
SQL lets you rapidly query and aggregate data across multiple tables beyond spreadsheet limits, with direct access, auditability, and reproducible analyses using familiar functions like count, sum, and average.
Download the Mac OS package from postgresql.org, install PostgreSQL with the EnterpriseDB interactive installer, and note that commands remain the same across versions while using the latest release.
Install PostgreSQL on Windows using the same installation directory, data stored in the data folder, and set the pgAdmin password; use port 5432 and finish by unchecking stack builder.
Explore a practice dvd rental database with 15 tables, primary keys, and relationships created in MySQL to analyze sales and customer rental behavior using SQL.
Create and restore a sample database in PgAdmin 4 for PostgreSQL 10 for Mac users, using the dvd_rental tar file; name the database dvd_rental and restore the sample data.
Please download the attached Challenge Questions.
Learn additional SQL statements and operators to use with select, from, and where to pose more advanced questions about your data.
Explore the in operator in the where clause, using in and not in to match values in a list, compare with the or operator, and learn query patterns with examples.
Write sql queries to return film id, title, and description for ratings G, PG-13, and NC-17, using either or conditions or the in operator for cleaner syntax.
Learn how to perform case-insensitive text matching with ilike to handle formatting inconsistencies when retrieving customer information, using Gwen as an example.
Retrieve null values from the address two column in the address table using a where clause with is null. This example highlights how nulls appear and can be queried.
Sort results with the order by statement to arrange data in ascending or descending order, including sorting by multiple columns.
Please download the attached challenge questions.
Master linking data across multiple tables with SQL joins, using keys and an entity-relationship diagram to relate tables and run multi-table queries.
Identify how primary keys uniquely identify rows and how foreign keys link related tables to enable joins. Use customer_id as the common key to relate payments to customers.
Explore inner joins, the default way to join tables on a common key. The example links a customer table and a payment table, returning only records with matching customer IDs.
Learn how to perform an inner join between two tables, selecting and qualifying columns from the customer and payment tables using a common key with the on clause.
Master aliases in SQL by creating shortcuts from the first letter to rename attributes and using them in from and join clauses, including arithmetic operations in the select clause.
Perform arithmetic operations in a select clause to create new attributes, such as calculating a 50% discount as half the amount, rounding to two decimals, and aliasing as half amount.
Explore the difference between inner and outer joins, and learn left, right, and full outer joins with practical examples for data analysts and data scientists.
Use a left join to identify films without inventory by linking film and inventory on film_id, selecting film id and title, and filtering null inventory_id, then sort by film id.
Understand right join through a customer and payment example. See how table B’s complete set of records appears with matches from table A and nulls for nonmatching rows.
So how do you decide whether to use LEFT JOIN, JOIN or RIGHT JOIN again?
Remember you would use JOIN-- if when joining a particular table (say, Table B) to the first table (say, Table A), you want to keep all the IDs that only match in both tables.
You would use LEFT JOIN -- if when joining a particular table (say, Table B) to the first table (say, Table A), you want to keep all the ID records in Table A even if they don't necessarily match with the IDs in Table B.
Finally, you would use RIGHT JOIN -- if when joining a particular table (say, Table B) to the first table (say, Table A), you want to keep all the ID records in Table B even if they don't necessarily match with the IDs in Table A. It's the reverse of LEFT JOIN!
Keep this in mind as you join multiple tables together.
If there are more than two tables, think of Table A as previously joined tables (film and film_category tables) --- right before you join Table B (inventory table). For example, I'll use JOIN operation to join the film table and film_category table since they are perfectly matched by film ID. On the other hand, I'll use LEFT JOIN to join these joined tables with the inventory table, as I want to make sure that all the records and film IDs under the film table and film_category table will be kept even if some film IDs are not available in the inventory table (no inventory).
SELECT f.film_id, f.title
FROM film f
JOIN film_category fc
ON f.film_id = fc.film_id
LEFT JOIN inventory i
ON f.film_id = i.film_id;
Hope this illustration helps! Good luck!
Discover how a full join returns records from both tables, with nulls for unmatched rows, and compare it with left, right, and inner joins using a customer and payment example.
Please download the attached challenge questions.
Discover how to use the count function to tally rows, count specific attributes, and count distinct values to remove duplicates.
Explore counting films with no inventory by performing a left join between film and inventory, filtering for null inventory_id, and counting via count(*) or count(film_id).
Count the number of distinct rental rates for films rated G or PG 13 using the film table, filtering by rating. The example shows rates like 4.99299 and 0.99.
Explore how the sql sum and avg functions compute totals and means on numeric columns, with sum treating nulls as zero and avg ignoring nulls, through practical examples.
Calculate the average amount paid by Elizabeth Brown with the avg function, then round up to two decimals, and compare with a manual sum divided by count.
Learn to compute first and last rental dates per film, with film id and title, by joining film, inventory, and rental tables and using max and min group by film.
Master One of the Most In-demand Skills for Data Analysts in 2025!
This guided bootcamp will take absolute beginners through the basics of SQL to an ability to write queries with confidence. Nowadays, with so many companies relying on big data analytics for decision-making, analysts with good SQL skills are some of the most sought after by employers. Whether you're in marketing, operations or finance, this course will help you gain lots of practice and confidence in your SQL skills.
The Practical SQL Bootcamp for Data Analysts and Data Scientists course is a step-by-step guide to learning the fundamental SQL commands commonly used by analysts and future data scientists in their day-to-day tasks. The course walks you through each SQL command, provides examples for applying such command in typical query that analysts use in their day-to-day job and then allows you to apply or test what you've learned through exercises and challenges.
Bonuses available:
SUPER BONUS 1: SQL Oral Interview Test Prep Questions
SUPER BONUS 2: SQL Technical Written Interview Prep Questions
Who is this course for?
Absolute beginners in SQL can take this course
You'll go from not knowing anything about SQL to being someone ready for SQL technical interview and confident with their SQL skills. Most business or data analyst and data scientist positions will test your SQL skills, so this course will equip you with the essential skills you need for your job!
Aspiring business analysts, data analysts or data scientists
This course is for students who are aspiring to be analysts. You'll learn the essential commands used by actual business analysts, data analysts or data scientists in their day-to-day jobs. You will be doing a lot of data manipulation and analysis!
Those who want to learn PostgreSQL!
PostgreSQL is arguably the most advanced and powerful open-source enterprise class relational database system. It's also free! A lot of companies use PostgreSQL. The commands that you will learn in this course do apply to other relational databases as well such as MySQL.
What this course is NOT?
The course is not going to teach you how to create a database or how to manage database. If you find yourself in tutorials talking about things like: CREATE DATABASE, DROP DATABASE, INSERTING DATA, etc., you've gone down the wrong rabbit hole! These tasks are usually done by engineers and database administrators - not analysts or data scientists. Pick tutorials that are geared towards DATA ANALYSIS.
Ok, you'll learn how to code using SQL and at the same time learn how to think critically when analyzing data!
By the end of the course, you'll learn how to:
Retrieve data from specific tables
Filter rows or get the desired observations for your analysis
Advanced filter functions that include pattern matching
Limit the output to a number of rows rather than show the full dataset
Order or sort the output based on desired columns
Be able to join multiple tables together to get the needed attributes
Conduct arithmetic operations
Rename your attributes
Summarize data by performing data aggregations
Performing data aggregations and arithmetic operations by subgroups
How to structure data for analysis
Learn how to use subquery to make your coding and querying a lot more efficient
Be able to use if/then statements
Data cleaning such as extracting a subset of string from the left, right or middle
Concatenating columns
New Bonus! SQL Interview Questions
*Please refer to the class curriculum below for the particular SQL commands covered.
LEARN TO CODE BY DOING
Start coding like analysts do with hands on exercises and challenges that use real-world database. The examples are meant to help you understand the concept in a practical way; the exercises are meant to help you apply what you've learned; and the challenges are meant to further test your knowledge and perfect your new skills.
GET PERSONALIZED FEEDBACK FROM THE INSTRUCTOR
The instructor aims to assist each student in their learning. The instructor gives her personalized feedback to the student's weekly challenge (upon submission). Solutions are also available for students to review.
GET ASSISTANCE FROM THE INSTRUCTOR AS NEEDED
No need to feel stuck on any concept or challenge! You can easily send a message to the instructor or send an email if you need help. Our students are on our priority list!
JOIN THE COMMUNITY OF LEARNERS
Join the community of students and learn SQL together, and maybe meet new friends along the way.
GET A COURSE CERTIFICATE
Students who pass all the challenges will get a course certificate! You may also get LinkedIn recommendation (upon request)
Hoping to embark on a data analyst or data scientist career? Learn SQL -- one of the most in-demand data analytic skills today.
As a previous Professor and now a Statistics/Analytics content manager for an education tech company, I use a teaching method that makes it super easy for students to learn. I teach SQL in a practical way so I explain concepts with examples, then you have an opportunity to apply what you've learned through exercises and further test your knowledge with weekly challenges.
WHAT SOME OF MY STUDENTS SAY ABOUT THE COURSE:
"It was a great course and very easy to follow especially for someone who had no experience in SQL. The examples given were simple and Dr. Cas breaks it down really well so you can understand better. She walks you through all the different queries thoroughly and also writes down some helpful hints if you get stuck. She was also very attentive when I got stuck on one of the challenges and reached out to her one late night. She helped me understand it better by giving me more guidance and helped me think outside the box.
Overall, this was a great course to take and now I have another skill under my belt all thanks to Dr. Cas! Thanks for everything!"
- Karla Flores, Senior Financial Analyst, Adobe (California, USA)
"Excellent course and terrific inputs about every query. Majority of the job interviews that I appeared before this course had questions on SQL and I used to mess it up since I didn't have my basics strong.This course not just helped me with the basics but also with the advanced concepts. It's absolutely brilliant. I just feel completely charged up to attend any DS interview where SQL is a skill set that is asked. My motivation was not to give any chance to the interviewer/recruiter is to not provide any more opportunities to them to reject me and this helped me at least get to that stage. Rest of the outcome depends on the practice that I do. Only need some practice on the Data Cleaning section else I think I am prepared from an interview standpoint. Thanks for all the inputs and support Ava." - R Suraj Kumar
"This was my first time taking an online data analysis class outside an academic setting. I worried about how the design would work for me as a working professional and if it would enable me grasp the material, but I must say that everything about the online course was smooth, convenient, and enjoyable.
The concise tutorial videos, quizzes with solutions and availability of the instructor, made it easy for me to understand the topics. The method, order, and scheduling were accommodating and in my opinion, makes it convenient for anyone, anywhere to take the course, and of course, the content was very useful to me.
I'm glad I took this course and I will strongly recommend it and others to follow, to anyone trying to develop more skills for data analysis. "
- Clare Ofodile, Project Manager, Quality Assurance and Research Development Agency Nigeria (Lagos, Nigeria)
"I like this course as it is very easy to understand and relevant for a beginner like me. I wish I could have some more courses like this one. I really enjoyed it and I started to like SQL more. A big thank you to my teacher!" - Ana Rotari
This instructor is highly effective and efficient in getting the critical knowledge across. Unlike other courses, this one did not drag. Time was well managed with the instructor's teaching approach. In just three and a half hours, this course can be a career changing investment. – Jose Floresca Jr.
"This course sparks my most interest in SQL and you MUST take to get strong foundation in SQL. Teacher Ava provides a very organized and informative course which is worth best 5 stars. And more than that, she always be there to support you to clarify your confusion. Believe me, after this course, your level of confidence improves a lot and exceed your expectation. For me, I'd like to attend more SQL courses from Ava in next levels. I hope she will have some good news." – Dannie Le