SQL Basics Presentation
Covers SQL Queries, Joins,
Aggregation, and More
SQL Basics: SELECT & WHERE
• - SELECT retrieves data from tables
• - WHERE filters records based on conditions
• - Supports arithmetic and logical operations
SQL Functions
• - Date Functions: NOW(), CURDATE(), YEAR()
• - Numeric Functions: ROUND(), CEIL(), FLOOR()
• - String Functions: CONCAT(), LOWER(),
UPPER()
Creating Tables & Keys
• - Tables store structured data
• - Primary Key uniquely identifies records
• - Foreign Key enforces relationships between
tables
Grouping, Aggregation & Ordering
• - GROUP BY groups data
• - Aggregation Functions: SUM(), AVG(),
COUNT()
• - ORDER BY sorts results in ascending or
descending order
SQL Joins
• - INNER JOIN: Matches records in both tables
• - LEFT JOIN: Includes all records from left table
• - RIGHT JOIN: Includes all records from right
table
• - FULL JOIN: Includes all records from both
tables
Views & Set Operations
• - Views: Virtual tables (updatable & non-
updatable)
• - Set Operations: UNION, INTERSECT, MINUS