SQL Basics - Data Science Part #1

A simple to learn the basic of SQL

In partnership with

In today’s newsletter

  1. SQL Quick Notes for Beginners

  2. Complete Basic ROADMAP download (PDF)

SQL Quick Notes for Beginners

1. Understanding Data in SQL

  • Structured Data: Organized in tables like a spreadsheet.

  • Relational Database: Data is stored in tables (relations) with columns (attributes) and rows (tuples).

2. SQL Data Types

  • Numeric: INT, BIGINT, DECIMAL, FLOAT

  • Strings: CHAR(n), VARCHAR(n), TEXT

  • Date & Time: DATE, DATETIME, TIMESTAMP

  • Boolean: BOOLEAN (TRUE/FALSE)

  • Other: JSON, BLOB, UUID

3. Basic SQL Queries

Retrieve all data:

SELECT * FROM books;

Retrieve specific columns:

SELECT title, price FROM books;

Filter data with conditions:

SELECT * FROM books WHERE price > 10 AND in_stock = TRUE;

Sorting:

SELECT title, price FROM books ORDER BY price DESC;

Limiting results (Pagination):

SELECT title FROM books LIMIT 5 OFFSET 10;

4. Keys in SQL (Database Design)

  • Primary Key: Uniquely identifies rows (e.g., book_id in books table).

  • Foreign Key: Links one table to another (e.g., author_id in books referring to authors).

  • Unique Key: Ensures unique values (e.g., ISBN).

  • Composite Key: A key using multiple columns (e.g., order_id, product_id in an order_items table).

5. SQL Relationships

  • One-to-Many (1:N): A customer can place multiple orders.

  • Many-to-Many (M:N): A book can belong to multiple categories, and a category can contain multiple books.

6. Filtering & Logical Conditions

  • Comparison Operators: =, !=, <, >, <=, >=

  • Logical Operators: AND, OR, NOT

  • BETWEEN: price BETWEEN 10 AND 20

  • LIKE: title LIKE 'Harry Potter%' (Finds titles starting with 'Harry Potter')

  • IN: author IN ('J.K. Rowling', 'George Orwell')

Beginner Level (No Prior Experience Needed)

  1. SQL for Data Science – UC Davis

    • Great for learning SQL in a data analysis context.

    • Uses SQLite.

  2. Databases and SQL for Data Science with Python – IBM

    • Covers SQL + Python integration.

    • Uses IBM Db2 (industry-level SQL).

  3. Querying Data with Transact-SQL – Microsoft

    • Best for Microsoft SQL Server users.

  4. Introduction to Querying Databases

    • Covers CRUD operations (SELECT, INSERT, UPDATE, DELETE).

Intermediate Level (Deepen Your Skills)

  1. Data Analysis with SQL – Google

    • Part of Google’s Data Analytics Certificate.

    • Uses BigQuery.

  2. Advanced SQL for Data Scientists – LinkedIn Learning

    • Covers window functions, CTEs, and optimization.

  3. Analyzing Big Data with SQL – Cloudera

    • Focuses on SQL for large datasets (Hive, Impala).

  4. Data Science: Querying with SQL – HarvardX

    • From Harvard, designed for data scientists.

Advanced Level (Database Management & Performance)

  1. Database Design & Basic SQL in PostgreSQL – University of Michigan

    • Covers database structure and normalization.

  2. PostgreSQL for Everybody Specialization – University of Michigan

    • Comprehensive PostgreSQL learning path.

  3. NoSQL Systems – UC San Diego

    • Covers MongoDB, Cassandra, and document-based databases.

  4. Data Management & Visualization – Wesleyan University

    • SQL + data visualization skills.

Suggested Learning Path

Beginner: Start with UC Davis or IBM SQL for Data Science.
Intermediate: Learn SQL for BigQuery or Advanced SQL for Data Scientists.
Advanced: Choose PostgreSQL or NoSQL courses based on your career needs.

PRESENTED BY DEEL

Optimize global IT operations with our World at Work Guide

Explore this ready-to-go guide to support your IT operations in 130+ countries. Discover how:

  • Standardizing global IT operations enhances efficiency and reduces overhead

  • Ensuring compliance with local IT legislation to safeguard your operations

  • Integrating Deel IT with EOR, global payroll, and contractor management optimizes your tech stack

Leverage Deel IT to manage your global operations with ease.

Here is the complete Roadmap

The Basic of SQL + List of courses .pdf1.53 MB • PDF File

How much are satisfied with today's newsletter

Login or Subscribe to participate in polls.

Thanks for your time and considerations

Shailesh