• For Individuals
  • For Businesses
  • For Universities
  • For Governments
Coursera
  • Online Degrees
  • Careers
  • Log In
  • Join for Free
    Coursera
    University of California, Davis
    SQL for Data Science
    • About
    • Outcomes
    • Modules
    • Recommendations
    • Testimonials
    • Reviews
    1. Browse
    2. Data Science
    3. Data Analysis
    University of California, Davis

    SQL for Data Science

    This course is part of Learn SQL Basics for Data Science Specialization

    Sadie St. Lawrence

    Instructor: Sadie St. Lawrence

    660,998 already enrolled

    Included with Coursera Plus

    •Learn more
    4 modules
    Gain insight into a topic and learn the fundamentals.
    4.6

    (16,812 reviews)

    Beginner level
    No prior experience required
    Flexible schedule
    Approx. 15 hours
    Learn at your own pace
    91%
    Most learners liked this course

    4 modules
    Gain insight into a topic and learn the fundamentals.
    4.6

    (16,812 reviews)

    Beginner level
    No prior experience required
    Flexible schedule
    Approx. 15 hours
    Learn at your own pace
    91%
    Most learners liked this course
    • About
    • Outcomes
    • Modules
    • Recommendations
    • Testimonials
    • Reviews

    What you'll learn

    • Identify a subset of data needed from a column or set of columns and write a SQL query to limit to those results.

    • Use SQL commands to filter, sort, and summarize data.

    • Create an analysis table from multiple queries using the UNION operator.

    • Manipulate strings, dates, & numeric data using functions to integrate data from different sources into fields with the correct format for analysis.

    Skills you'll gain

    • Data Quality
    • Data Modeling
    • Data Manipulation
    • Query Languages
    • Data Analysis
    • Database Design
    • Relational Databases
    • Data Cleansing
    • SQL
    • Data Governance

    Details to know

    Shareable certificate

    Add to your LinkedIn profile

    Assessments

    14 assignments

    Taught in English

    See how employees at top companies are mastering in-demand skills

    Learn more about Coursera for Business
     logos of Petrobras, TATA, Danone, Capgemini, P&G and L'Oreal

    Build your subject-matter expertise

    This course is part of the Learn SQL Basics for Data Science Specialization
    When you enroll in this course, you'll also be enrolled in this Specialization.
    • 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
    Coursera Career Certificate

    Earn a career certificate

    Add this credential to your LinkedIn profile, resume, or CV

    Share it on social media and in your performance review

    Coursera Career Certificate

    There are 4 modules in this course

    As data collection has increased exponentially, so has the need for people skilled at using and interacting with data; to be able to think critically, and provide insights to make better decisions and optimize their businesses. This is a data scientist, “part mathematician, part computer scientist, and part trend spotter” (SAS Institute, Inc.). According to Glassdoor, being a data scientist is the best job in America; with a median base salary of $110,000 and thousands of job openings at a time. The skills necessary to be a good data scientist include being able to retrieve and work with data, and to do that you need to be well versed in SQL, the standard language for communicating with database systems.

    This course is designed to give you a primer in the fundamentals of SQL and working with data so that you can begin analyzing it for data science purposes. You will begin to ask the right questions and come up with good answers to deliver valuable insights for your organization. This course starts with the basics and assumes you do not have any knowledge or skills in SQL. It will build on that foundation and gradually have you write both simple and complex queries to help you select data from tables. You'll start to work with different types of data like strings and numbers and discuss methods to filter and pare down your results. You will create new tables and be able to move data into them. You will learn common operators and how to combine the data. You will use case statements and concepts like data governance and profiling. You will discuss topics on data, and practice using real-world programming assignments. You will interpret the structure, meaning, and relationships in source data and use SQL as a professional to shape your data for targeted analysis purposes. Although we do not have any specific prerequisites or software requirements to take this course, a simple text editor is recommended for the final project. So what are you waiting for? This is your first step in landing a job in the best occupation in the US and soon the world!

    In this module, you will be able to define SQL and discuss how SQL differs from other computer languages. You will be able to compare and contrast the roles of a database administrator and a data scientist, and explain the differences between one-to-one, one-to-many, and many-to-many relationships with databases. You will be able to use the SELECT statement and talk about some basic syntax rules. You will be able to add comments in your code and synthesize its importance.

    What's included

    11 videos4 readings4 assignments2 discussion prompts

    11 videos•Total 51 minutes
    • Course Introduction•4 minutes•Preview module
    • Module Introduction•1 minute
    • What is SQL Anyway?•7 minutes
    • Data Models, Part 1: Thinking About Your Data•5 minutes
    • Data Models, Part 2: The Evolution of Data Models•3 minutes
    • Data Models, Part 3: Relational vs. Transactional Models•5 minutes
    • Retrieving Data with a SELECT Statement•4 minutes
    • Creating Tables•7 minutes
    • Creating Temporary Tables•4 minutes
    • Adding Comments to SQL•5 minutes
    • Summary•1 minute
    4 readings•Total 62 minutes
    • Course Navigation•10 minutes
    • Online Safety Statement•2 minutes
    • SQL Overview•15 minutes
    • Data Modeling and ER Diagrams•35 minutes
    4 assignments•Total 100 minutes
    • Module 1 Quiz•30 minutes
    • Module 1 Coding Questions•10 minutes
    • Let's Practice!•30 minutes
    • Practice Simple Select Queries•30 minutes
    2 discussion prompts•Total 40 minutes
    • Your Goals For This Course•10 minutes
    • Comparing NoSQL and SQL•30 minutes

    In this module, you will be able to use several more new clauses and operators including WHERE, BETWEEN, IN, OR, NOT, LIKE, ORDER BY, and GROUP BY. You will be able to use the wildcard function to search for more specific or parts of records, including their advantages and disadvantages, and how best to use them. You will be able to discuss how to use basic math operators, as well as aggregate functions like AVERAGE, COUNT, MAX, MIN, and others to begin analyzing our data.

    What's included

    9 videos1 reading3 assignments

    9 videos•Total 49 minutes
    • Module Introduction•1 minute•Preview module
    • Basics of Filtering with SQL•8 minutes
    • Advanced Filtering: IN, OR, and NOT•7 minutes
    • Using Wildcards in SQL•6 minutes
    • Sorting with ORDER BY•4 minutes
    • Math Operations•4 minutes
    • Aggregate Functions•6 minutes
    • Grouping Data with SQL•5 minutes
    • Putting it All Together•3 minutes
    1 reading•Total 25 minutes
    • SQL for Various Data Science Languages•25 minutes
    3 assignments•Total 105 minutes
    • Module 2 Quiz•30 minutes
    • Module 2 Coding Assignment•45 minutes
    • Module 2 Practice Quiz•30 minutes

    In this module, you will be able to discuss subqueries, including their advantages and disadvantages, and when to use them. You will be able to recall the concept of a key field and discuss how these help us link data together with JOINs. You will be able to identify and define several types of JOINs, including the Cartesian join, an inner join, left and right joins, full outer joins, and a self join. You will be able to use aliases and pre-qualifiers to make your SQL code cleaner and efficient.

    What's included

    10 videos2 readings3 assignments1 discussion prompt

    10 videos•Total 58 minutes
    • Module Introduction•1 minute•Preview module
    • Using Subqueries•6 minutes
    • Subquery Best Practices and Considerations•8 minutes
    • Joining Tables: An Introduction•5 minutes
    • Cartesian (Cross) Joins•4 minutes
    • Inner Joins•8 minutes
    • Aliases and Self Joins•5 minutes
    • Advanced Joins: Left, Right, and Full Outer Joins•7 minutes
    • Unions•5 minutes
    • Summary•5 minutes
    2 readings•Total 20 minutes
    • SQL and Python•10 minutes
    • Union and Union All•10 minutes
    3 assignments•Total 105 minutes
    • Module 3 Quiz•30 minutes
    • Module 3 Coding Assignment•45 minutes
    • Practice Quiz - Writing Queries•30 minutes
    1 discussion prompt•Total 20 minutes
    • What do you think you'll use?•20 minutes

    In this module, you will be able to discuss how to modify strings by concatenating, trimming, changing the case, and using the substring function. You will be able to discuss the date and time strings specifically. You will be able to use case statements and finish this module by discussing data governance and profiling. You will also be able to apply fundamental principles when using SQL for data science. You'll be able to use tips and tricks to apply SQL in a data science context.

    What's included

    11 videos3 readings4 assignments1 discussion prompt

    11 videos•Total 55 minutes
    • Module Introduction•1 minute•Preview module
    • Working with Text Strings•7 minutes
    • Working with Date and Time Strings•5 minutes
    • Date and Time Strings Examples•5 minutes
    • Case Statements•7 minutes
    • Views•6 minutes
    • Data Governance and Profiling•5 minutes
    • Using SQL for Data Science, Part 1•5 minutes
    • Using SQL for Data Science, Part 2•6 minutes
    • USDA Acknowledgment Video•2 minutes
    • Course Summary•2 minutes
    3 readings•Total 61 minutes
    • Additional SQL Resources to Explore•15 minutes
    • Final Project Instructions, Scripts, & Datasets•45 minutes
    • USDA Acknowledgment•1 minute
    4 assignments•Total 155 minutes
    • Module 4 Quiz•30 minutes
    • Module 4 Coding Questions•35 minutes
    • Final Project•45 minutes
    • Practice Final Project•45 minutes
    1 discussion prompt•Total 15 minutes
    • How do you Plan on Using SQL in the Future?•15 minutes

    Instructor

    Instructor ratings

    Instructor ratings

    We asked all learners to give feedback on our instructors based on the quality of their teaching style.

    4.7 (4,734 ratings)
    Sadie St. Lawrence
    Sadie St. Lawrence
    University of California, Davis
    4 Courses•677,135 learners

    Offered by

    University of California, Davis

    Offered by

    University of California, Davis

    UC Davis, one of the nation’s top-ranked research universities, is a global leader in agriculture, veterinary medicine, sustainability, environmental and biological sciences, and technology. With four colleges and six professional schools, UC Davis and its students and alumni are known for their academic excellence, meaningful public service and profound international impact.

    Explore more from Data Analysis

    • U

      University of California, Davis

      Learn SQL Basics for Data Science

      Specialization

    • U

      University of California, Davis

      SQL for Data Science Capstone Project

      Course

    • I

      IBM

      SQL for Data Science with R

      Course

    • F

      Fractal Analytics

      Data Analysis Using SQL

      Course

    Why people choose Coursera for their career

    Felipe M.
    Learner since 2018
    "To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
    Jennifer J.
    Learner since 2020
    "I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
    Larry W.
    Learner since 2021
    "When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
    Chaitanya A.
    "Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

    Learner reviews

    4.6

    16,812 reviews

    • 5 stars

      73.57%

    • 4 stars

      19.95%

    • 3 stars

      3.52%

    • 2 stars

      1.43%

    • 1 star

      1.51%

    Showing 3 of 16812

    K
    KF
    5

    Reviewed on Apr 2, 2023

    I loved the practices. I learned alot

    But I think some of them had mistakes... The online visual studio code never worked for me! It might be good to make a video that explains how to work with it.

    Y
    YL
    5

    Reviewed on Apr 19, 2021

    Exactly what I signed up for. Basic understanding and syntax learning. For anyone looking to further their sql writing, I believe this course and the rest of the curriculum will do perfectly fine

    A
    AV
    5

    Reviewed on Sep 12, 2021

    This course provided the necessary knowledge to use SQL effectively in deriving insights from data stored in database management systems. The exercises and quizes helped reinforce lessons learned.

    View more reviews

    New to Data Analysis? Start here.

    Software Configuration Management: Streamlining Your Development Workflow

    March 18, 2025

    Article

    How to Write a DevOps Resume (With Examples)

    April 17, 2025

    Article · 7 min read

    How Do I Become a Project Engineer? A Career Overview

    April 30, 2025

    Article

    Software Engineer Career Path 2025: Overview, Jobs, and Pay

    January 15, 2025

    Article · 11 min read

    Coursera Plus

    Open new doors with Coursera Plus

    Unlimited access to 10,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription

    Learn more

    Advance your career with an online degree

    Earn a degree from world-class universities - 100% online

    Explore degrees

    Join over 3,400 global companies that choose Coursera for Business

    Upskill your employees to excel in the digital economy

    Learn more

    Frequently asked questions

    Access to lectures and assignments depends on your type of enrollment. If you take a course in audit mode, you will be able to see most course materials for free. To access graded assignments and to earn a Certificate, you will need to purchase the Certificate experience, during or after your audit. If you don't see the audit option:

    • The course may not offer an audit option. 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 Specialization, 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. If you only want to read and view the course content, you can audit the course for free.

    If you subscribed, you get a 7-day free trial during which you can cancel at no penalty. After that, we don’t give refunds, but you can cancel your subscription at any time. See our full refund policyOpens in a new tab.

    Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.

    More questions

    Visit the learner help center

    Financial aid available,

    Coursera Footer

    Technical Skills

    • ChatGPT
    • Coding
    • Computer Science
    • Cybersecurity
    • DevOps
    • Ethical Hacking
    • Generative AI
    • Java Programming
    • Python
    • Web Development

    Analytical Skills

    • Artificial Intelligence
    • Big Data
    • Business Analysis
    • Data Analytics
    • Data Science
    • Financial Modeling
    • Machine Learning
    • Microsoft Excel
    • Microsoft Power BI
    • SQL

    Business Skills

    • Accounting
    • Digital Marketing
    • E-commerce
    • Finance
    • Google
    • Graphic Design
    • IBM
    • Marketing
    • Project Management
    • Social Media Marketing

    Career Resources

    • Essential IT Certifications
    • High-Income Skills to Learn
    • How to Get a PMP Certification
    • How to Learn Artificial Intelligence
    • Popular Cybersecurity Certifications
    • Popular Data Analytics Certifications
    • What Does a Data Analyst Do?
    • Career Development Resources
    • Career Aptitude Test
    • Share your Coursera Learning Story

    Coursera

    • About
    • What We Offer
    • Leadership
    • Careers
    • Catalog
    • Coursera Plus
    • Professional Certificates
    • MasterTrack® Certificates
    • Degrees
    • For Enterprise
    • For Government
    • For Campus
    • Become a Partner
    • Social Impact
    • Free Courses
    • ECTS Credit Recommendations

    Community

    • Learners
    • Partners
    • Beta Testers
    • Blog
    • The Coursera Podcast
    • Tech Blog
    • Teaching Center

    More

    • Press
    • Investors
    • Terms
    • Privacy
    • Help
    • Accessibility
    • Contact
    • Articles
    • Directory
    • Affiliates
    • Modern Slavery Statement
    • Manage Cookie Preferences
    Learn Anywhere
    Download on the App Store
    Get it on Google Play
    Logo of Certified B Corporation
    © 2025 Coursera Inc. All rights reserved.
    • Coursera Facebook
    • Coursera Linkedin
    • Coursera Twitter
    • Coursera YouTube
    • Coursera Instagram
    • Coursera TikTok
    Coursera

    Sign up

    Learn on your own time from top universities and businesses.

    ​
    ​
    Between 8 and 72 characters
    Your password is hidden
    ​

    or

    Already on Coursera?


    I accept Coursera's Terms of Use and Privacy Notice. Having trouble logging in? Learner help center

    This site is protected by reCAPTCHA Enterprise and the Google Privacy Policy and Terms of Service apply.