Learning SQL with Handwritten Notes ✍️

SQL (Structured Query Language) is the standard language for dealing with relational databases. Whether you’re a backend developer, data analyst, or a tech enthusiast, SQL is an essential tool in your toolkit.

Today, I learned and created handwritten …


This content originally appeared on DEV Community and was authored by Mohit Decodes

SQL (Structured Query Language) is the standard language for dealing with relational databases. Whether you're a backend developer, data analyst, or a tech enthusiast, SQL is an essential tool in your toolkit.

Today, I learned and created handwritten notes to help solidify the concepts. Here's what I covered:

🔹 What is SQL?

SQL is used to read, manipulate, and store data in relational databases.

Why SQL?

  • Easy to learn & use
  • Powerful for querying large datasets
  • Preferred for data audits over spreadsheets

🧾 Basic SQL Syntax

SELECT Statement

SELECT * FROM Sales;

Selects all columns from the Sales table.

SELECT year, month FROM Sales;

Selects specific columns.

Aliases

SELECT west AS "West Region" FROM Sales;

Renames a column temporarily for readability.

🔍 Filtering with WHERE Clause

Basic Comparison

SELECT * FROM Sales WHERE Country = 'India';
SELECT * FROM Sales WHERE City != 'Delhi';
SELECT * FROM Sales WHERE SalesAmount > 50000;

🔢 LIMIT Clause

SELECT * FROM Sales LIMIT 100;

Limits output to 100 records.

➕ Arithmetic Operations

SQL supports row-wise arithmetic:

SELECT west + south AS total_sales FROM Sales;

📋 Data Modification

CREATE TABLE

CREATE TABLE Person (
  PersonID int,
  LastName varchar(255),
  FirstName varchar(255),
  Address varchar(255),
  City varchar(255)
);

INSERT INTO

INSERT INTO Person (FirstName, LastName) VALUES ('John', 'Doe');

UPDATE

UPDATE Sales SET City = 'Goa' WHERE CustomerID = 1;

DELETE

DELETE FROM Sales WHERE CustomerName = 'Bob';

🕳️ NULL Handling

SELECT * FROM Sales WHERE Address IS NULL;
SELECT * FROM Sales WHERE Address IS NOT NULL;

📊 Aggregate Functions

  • COUNT()
  • SUM()
  • AVG()
  • MIN()
  • MAX()
SELECT COUNT(*) FROM Sales;
SELECT SUM(SalesAmount) FROM Sales;

📦 GROUP BY & HAVING

SELECT year, COUNT(*) FROM Sales GROUP BY year;
SELECT month, MAX(high) FROM Sales GROUP BY month HAVING MAX(high) > 400;

🧠 Logical Operators

  • AND, OR, NOT
  • LIKE, IN, BETWEEN
  • IS NULL, IS NOT NULL

Got stuck? Want to showcase your version? Drop a link or comment below.
📲 Follow me on Instagram or WhatsApp for daily frontend tips.


This content originally appeared on DEV Community and was authored by Mohit Decodes


Print Share Comment Cite Upload Translate Updates
APA

Mohit Decodes | Sciencx (2025-06-25T07:16:34+00:00) Learning SQL with Handwritten Notes ✍️. Retrieved from https://www.scien.cx/2025/06/25/learning-sql-with-handwritten-notes-%e2%9c%8d%ef%b8%8f/

MLA
" » Learning SQL with Handwritten Notes ✍️." Mohit Decodes | Sciencx - Wednesday June 25, 2025, https://www.scien.cx/2025/06/25/learning-sql-with-handwritten-notes-%e2%9c%8d%ef%b8%8f/
HARVARD
Mohit Decodes | Sciencx Wednesday June 25, 2025 » Learning SQL with Handwritten Notes ✍️., viewed ,<https://www.scien.cx/2025/06/25/learning-sql-with-handwritten-notes-%e2%9c%8d%ef%b8%8f/>
VANCOUVER
Mohit Decodes | Sciencx - » Learning SQL with Handwritten Notes ✍️. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/06/25/learning-sql-with-handwritten-notes-%e2%9c%8d%ef%b8%8f/
CHICAGO
" » Learning SQL with Handwritten Notes ✍️." Mohit Decodes | Sciencx - Accessed . https://www.scien.cx/2025/06/25/learning-sql-with-handwritten-notes-%e2%9c%8d%ef%b8%8f/
IEEE
" » Learning SQL with Handwritten Notes ✍️." Mohit Decodes | Sciencx [Online]. Available: https://www.scien.cx/2025/06/25/learning-sql-with-handwritten-notes-%e2%9c%8d%ef%b8%8f/. [Accessed: ]
rf:citation
» Learning SQL with Handwritten Notes ✍️ | Mohit Decodes | Sciencx | https://www.scien.cx/2025/06/25/learning-sql-with-handwritten-notes-%e2%9c%8d%ef%b8%8f/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.