Comprehensive Mindmap for Mastering SQL (On Eagle View)

# SQL (On Eagle View)

**Shekar Kaki**  
[LinkedIn](www.linkedin.com/in/shekar-dataengineer) | [Website](indiantalent.net) | [YouTube](https://www.youtube.com/@UrbanSchool369)

## Topics
- Database
- SQL Syntax
- Data Types
- Constraints
- Operators
- Functions
- Queries
- Joins
- Subqueries
- Transactions
- Indexing
- Optimization
- Security
- Administration

## SQL Statements
### Data Definition Language (DDL)
- CREATE
  - Tables
  - Views
  - Indexes
  - Databases
- ALTER
  - Tables
  - Columns
  - Constraints
- DROP
  - Tables
  - Views
  - Indexes
  - Databases
- TRUNCATE

### Data Manipulation Language (DML)
- INSERT
  - Single Row
  - Bulk Insert
- UPDATE
  - Single Row
  - Bulk Update
- DELETE
  - Single Row
  - Bulk Delete

### Data Control Language (DCL)
- GRANT
  - Permissions
  - Roles
- REVOKE
  - Permissions
  - Roles

### Transaction Control Language (TCL)
- COMMIT
- ROLLBACK
- SAVEPOINT

### Clauses
- SELECT
  - Column Selection
  - Distinct
  - Aliases
- FROM
  - Table References
  - Subqueries
- WHERE
  - Conditions
  - Logical Operators
- GROUP BY
  - Aggregates
  - HAVING
- ORDER BY
  - Sorting
  - ASC/DESC
- LIMIT/OFFSET

### Joins
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- FULL JOIN
- CROSS JOIN
- Self Joins

### Subqueries
- Correlated Subqueries
- Uncorrelated Subqueries
- Nested Queries
- Subqueries in DML

### Window Functions
- RANK
- DENSE_RANK
- ROW_NUMBER
- LEAD
- LAG
- NTILE
- OVER Clause
- PARTITION BY

### Set Operations
- UNION
- UNION ALL
- INTERSECT
- EXCEPT

## SQL Concepts
### Data Types
- Numeric
  - INT, BIGINT, FLOAT, DECIMAL
- Character
  - CHAR, VARCHAR, TEXT
- Date and Time
  - DATE, TIME, DATETIME, TIMESTAMP
- Boolean
  - BIT, BOOLEAN

### Constraints
- NOT NULL
- UNIQUE
- PRIMARY KEY
- FOREIGN KEY
  - Referential Integrity
- CHECK
  - Range Checks
  - Data Validation
- DEFAULT

### Operators
- Arithmetic
  - +, -, *, /, %
- Comparison
  - =, >, <, >=, <=, <>
- Logical
  - AND, OR, NOT
- String
  - CONCAT, SUBSTR, LENGTH

### Functions
#### Aggregate
- SUM
- AVG
- COUNT
  - COUNT(*), COUNT(column)
- MIN
- MAX

#### Scalar
- UPPER
- LOWER
- CONCAT
- SUBSTR
- LENGTH
- TRIM
- CAST
- CONVERT

### Indexing
- Clustered Index
- Non-Clustered Index
- Covering Index
- Composite Index
- Index Maintenance

### Security
- Roles
  - CREATE, ALTER, DROP
- Permissions
  - GRANT, REVOKE
- Views
  - CREATE, ALTER, DROP
- Stored Procedures
  - CREATE, ALTER, DROP
- Triggers
  - CREATE, ALTER, DROP
- User-Defined Functions
  - CREATE, ALTER, DROP

### Administration
- Backup and Restore
  - Full, Differential, Incremental
- Performance Monitoring
  - Query Optimization
  - Indexing Strategies
- User Management
  - CREATE, ALTER, DROP Users
- Logging and Auditing
  - Error Logging
  - Activity Logging
- Database Tuning
  - Query Optimization
  - Index Maintenance
  - Resource Monitoring
Screenshot from 2024-04-09 00-55-14