Hi everyone! Cornellius and from here👋.
As promised, we are starting our SQL Crash Course, which will take you from zero to hero!🚀
As a reminder, we will cover seven SQL key topics, each separated into multiple posts across
and .The first topic we will learn together is the Introduction – What SQL is and why it matters. This topic will consist of three courses, including:
📌What is SQL?
📌Why learn SQL
📌Relational Data & Relational Models
In this post, I will post about what is SQL, and
will teach you all about why you need to learn SQL in the different posts!Without further ado, let’s get into our first course! The million dollar question is…
“What Is SQL?”
Look, I am sure you guys have heard SQL in some ways or might have used it previously.
However, have you ever sat down and just really asked the question above?
Let’s trace back a little bit to why SQL was born.
Picture this: You order a matcha latte through an app. You binge-watch a show Netflix swears you’ll love. You scroll Instagram, double-tapping posts that feel eerily tailored to your mood.
What do these moments have in common?
Data.
Every click, swipe, and search you make adds to a tsunami of information—2.5 quintillion bytes generated daily🤯. Businesses thrive on it, and governments depend on it. Even your favorite apps use it to predict your next move.
But here’s the catch: raw data is chaos. It’s a resource full of unanswered questions, hidden trends, and opportunities.
To utilize the data, you need a translator—a universal language that turns “What do we know?” into “What should we do next?”
Here comes the SQL (Structured Query Language) as our translator.
🤔So, What is SQL Exactly?
Think of SQL as the Google Translate for data. It’s how marketers decode customer habits, how hospitals track vaccine rollouts, and how Spotify actually knows you’d love that indie folk playlist.
It’s not just for programmers—SQL for anyone curious enough to ask, “What’s the story behind these numbers?” SQL acts as an intermediary, translating our requests into meaningful data and providing the insights we seek.
⌛A 50-Year-Old Language That’s Still Everywhere
Born in 1974, SQL is older than the internet itself. Yet, it’s still the gold standard for databases—powering everything from your bank’s transaction records to NASA’s Mars rover missions. Why? Because it just works.
SQL's logic stays the same whether you’re querying 100 rows or 100 million. That’s why your Spotify Wrapped playlist feels so good, and Amazon knows you’ll need dog food by Tuesday.
Well, enough fancy words. Let’s discuss what SQL is in the core.
🔎The Core of SQL
At its core, SQL is a way to talk to databases. It lets you:
Ask questions: “What products are under $20?”
Update records: “Add 50 points to Sarah’s loyalty account.”
Spot patterns: “Which customers buy pumpkin spice lattes in July?”
And here’s the best part: SQL looks almost like English. For example, here’s how a café owner might find all affordable pastries in their inventory:
SELECT item_name, price
FROM menu
WHERE category = 'pastries'
AND price < 5;
Translation: “Show me the names and prices of pastries costing less than $5.”
Pretty easy, right?😊
SQL isn’t targeted only for developers or techies—it’s for anyone who wants to use data. Even if you’ve never written a line of code, SQL is much more straightforward than other programming languages.
You can easily learn it if you put your mind into it! (And by following this course😉)
🧩Component of SQL
The language relies on a few intertwined components for SQL to work properly. Here are the essential SQL Components that make it work properly.
#1. Tables
Tables are the backbone of any database that relies on SQL. You can think of a table as a spreadsheet with rows and columns.
Each table usually represents a specific entity (e.g., users, products, transactions) and is the source of meaningful information.
#2. Statement Commands
SQL Statements Commands mainly instruct databases on what to do with our data in the Tables. They typically fall into three categories:
DDL (Data Definition Language): Defines the database structure (e.g., creating, altering, or dropping tables and indexes).
Commands:
CREATE TABLE
,ALTER
,DROP
Example:
CREATE TABLE Users (id INT, name VARCHAR(100));
DML (Data Manipulation Language): Manages data within the tables by inserting, updating, deleting, or retrieving records.
Commands:
SELECT
,INSERT
,UPDATE
,DELETE
Example:
INSERT INTO Users (id, name) VALUES (1, 'Alice');
DCL (Data Control Language): Controls permissions and access to the data.
Commands:
GRANT
,REVOKE
Example
GRANT SELECT ON Users TO analyst;
Think of these statements as the database's instruction command. However, they still lack precision, which is why we have the queries.
#3. Queries
Queries are how we use SQL to retrieve and manipulate data according to specific needs.
The Statement Commands were refined and structured to acquire data from tables into meaningful insights or results. For example, here is how the website owner is able to get the user’s total signup:
SELECT name, COUNT(*) FROM Users WHERE signup_date > '2024-01-01' GROUP BY name;
Think of queries as how you “talk” to the database but with the grammar you must put together correctly.
#4. Stored Procedures
Stored procedures are pre-written SQL scripts saved in the database. They act like shortcuts for repetitive SQL query tasks, such as a stock metrics aggregation.
CREATE PROCEDURE AggregateStockMetrics(
IN p_StartDate DATE,
IN p_EndDate DATE
)
BEGIN
SELECT
COUNT(*) AS TradingDays,
AVG(Close) AS AvgClose,
MIN(Low) AS MinLow,
MAX(High) AS MaxHigh,
SUM(Volume) AS TotalVolume
FROM stock_data
WHERE
(p_StartDate IS NULL OR Date >= p_StartDate)
AND (p_EndDate IS NULL OR Date <= p_EndDate);
END
Instead of writing a query from scratch for every task, we only need to call the procedure and pass the parameters to acquire necessary data.
CALL AggregateStockMetrics('2015-01-01', '2015-12-31');
That’s all the SQL components you need to know. I know it’s just scratching the surface, but it’s exactly why this course exists!
How to Get Started 🚀
Over the coming weeks, we’ll guide you through:
✅ SQL Fundamentals
✅ Intermediate SQL
✅ Advanced SQL
✅ Database Operations
✅ Writing Efficient Queries
What’s Next?➡️
This is the first of many posts about the upcoming SQL Courses. It will only explain what SQL is in its crude form.
To get the full experience and fully immersed in the learning:
👉Subscribe to Databites.tech (By Josep)
👉Subscribe to Non-Brand Data (By Cornellius)
👉Check out the SQL Crash Course GitHub repo
👉Share with your friend and whoever needs it!
🗓️ Every Thursday, you will have two new issues in your inbox!
Let’s dive in and make SQL less scary, more fun, and way more useful! 🚀
Josep & Cornellius