Introduction | SQL in 30 Minutes

Wouldn't you like to understand beginner-level SQL concepts in 30 minutes without any confusion? If so, then this guide will be perfect for you!

The goal

I want to give you all the required knowledge for your upcoming SQL exam in the shortest amount of time.

Throughout this guide, we'll be covering the following topics:

  • SELECT
  • FROM
  • JOIN
  • WHERE
  • GROUP BY
  • HAVING
  • ORDER BY
  • Aggregate functions
  • Troubleshooting errors

I estimate that this guide will take you around 30 minutes total. Much better than spending hours scrambling through class notes, right?

Why take it from me?

Picture of the author, Adam Wise
Adam Wise, Author of Coding for Crammers

I was behind enemy lines for 2 years as a teacher assistant for SQL. I know exactly what you need to be prepared for!

I've gathered the ins-and-outs of your SQL curriculum and compiled all you actually need to understand into this SQL series.

In other words, this is your roadmap to passing your SQL exam, and all you need to do is follow along!

The plan

Each article in this series, I'm going to (1) explain the concept in simple terms with a real-world scenario and (2) show you how to apply that scenario in SQL.

Why do it this way?

First, I want to put these SQL concepts in language that a 3rd grader would understand. That way, there's zero doubt it makes sense to you before we start coding.

Second, practice makes perfect. The more you code these things, the better you'll be able to apply what you've learned on your exam.

SQL Cheat Sheet

It's no secret you retain info better when you write it down. That's why I created the SQL Cheat Sheet for you!

Simply put, the SQL Cheat Sheet is your easiest and fastest way to finding all you need while coding! It's the Swiss-Army Knife of learning SQL.

As you come upon key concepts highlighted in yellow, like this sentence here, you can fill-in-the-blanks on your Cheat Sheet so that you remember all the important stuff for later.

You can obtain the SQL Cheat Sheet for FREE by entering your email below!

    Yes, I want to remember what I learn!

    Receive your FREE cheat sheet by entering your info below!

    Your Cheat Sheet PDF will be emailed to you within minutes! No waiting around!

    Start Learning!

    What is SQL?

    INTRO

    Learn core SQL concepts with a doctor's office filing cabinet.

    How to view records

    STEP 1

    Learn how to use SELECT & FROM commands while calling attendance.

    How to join tables

    STEP 2

    Learn how to use JOIN commands to figure out how long your flight is delayed for.

    How to filter records

    STEP 3

    Learn how to use WHERE commands to find the best shirt on your upcoming date.

    What is SQL?

    INTRO

    Learn core SQL concepts with a doctor's office filing cabinet.

    Click here for Intro

    How to view records

    STEP 1

    Learn how to use SELECT & FROM commands while calling attendance.

    Click here for Step 1

    How to join tables

    STEP 2

    Learn how to use JOIN commands to figure out how long your flight is delayed for.

    Click here for Step 2

    How to filter records

    STEP 3

    Learn how to use WHERE commands to find the best shirt on your upcoming date.

    Click here for Step 3

    How to make calculations

    STEP 4

    Learn aggregate functions and GROUP BY while comparing ages of boys vs. girls.

    How to filter results

    STEP 5

    Learn how to use the HAVING command to see if Mary qualified for her race.

    How to sort results

    STEP 6

    Learn how to use ORDER BY commands to line students up in alphabetical order.

    Fixing errors

    STEP 7

    Learn how to troubleshoot common errors in your SQL commands.

    How to make calculations

    STEP 4

    Learn aggregate functions and GROUP BY while comparing ages of boys vs. girls.

    Click here for Step 4

    How to filter results

    STEP 5

    Learn how to use the HAVING command to see if Mary qualified for her race.

    Click here for Step 5

    How to sort results

    STEP 6

    Learn how to use ORDER BY commands to line students up in alphabetical order.

    Click here for Step 6

    Fixing errors

    STEP 7

    Learn how to troubleshoot common errors in your SQL commands.

    Click here for Step 7


    What is SQL?

    Intro

    Learn core SQL concepts with a doctor's office filing cabinet.

    What is SQL?

    As defined by W3Schools, a world-renowned web developer site...

    SQL (Structured Query Language) is a standard language for accessing and manipulating databases.

    SQL is a coding language used to interact with databases through the use of queries.

    Picture this: a doctor’s office with a filing cabinet in the left corner containing relevant information to the office’s operation.

    Doctor's office with filing cabinet identified on left

    The filing cabinet has 3 drawers: Appointments, Clients, and Staff.

    The Appointments, Clients, and Staff cabinets identified on filing cabinet

    Each drawer contains papers with the same required information on each paper.

    For example, each paper in the Appointments drawer contains (1) the date and time of the appointment, (2) the name of the client, (3) the name of the doctor, and (4) a description of the appointment.

    The main components of SQL are databases, tables, and records.

    In comparison to the doctor's office, the filing cabinet is the database. Each drawer is a table. Each paper is a record.

    The entire cabinet is the database. Each cabinet is a table. Every paper in each cabinet is a record.

    "A doctor’s office with a filing cabinet containing relevant information to the office’s operation." This is the database.

    "The filing cabinet has 3 drawers: Appointments, Clients, and Staff." These are the tables.

    "Each drawer contains papers with the same required information on each paper." These are the records.

    "For example, each paper in the Appointments drawer contains (1) the date and time of the appointment, (2) the name of the client, (3) the name of the doctor, and (4) a description of the appointment." These are the fields of the Appointments table. Fields are essentially the columns of information contained in a table.

    Attributes are essential the specific values that each record contains corresponding to the table's fields.

    Think of fields as table specific. Each table has fields, or columns, like the date and time of the appointment, the name of the client, the name of the doctor, and a description of the appointment.

    Think of attributes as record specific. Each record has attributes, or values, for the columns corresponding to date and time of the appointment, the name of the client, the name of the doctor, and a description of the appointment.

    Whenever an employee goes into the office to createreadupdate, or delete information from the filing cabinet, they are executing a query.

    Now that you've got a conceptual understanding of how SQL works, let's start coding! Click below to move onto Step 1!

    SELECT & FROM

    STEP 1

    Learn how to use SELECT & FROM statements while calling attendance.

    Leave a Comment