« Previous MongoDB Tutorial 11. Database Design and Modeling
13. Data Definition Language (DDL) Next MongoDB Tutorial »
12.1 Introduction to SQL Queries
Overview of SQL (Structured Query Language)
Importance of SQL in database management
Basic SQL syntax and commands
12.2 SELECT Statement
Retrieving data from a single table using SELECT
Specifying columns in the SELECT clause
Using aliases for column names
12.3 WHERE Clause
Filtering data using the WHERE clause
Comparison operators (e.g., =, <>, <, >, BETWEEN, LIKE)
Logical operators (e.g., AND, OR, NOT)
12.4 ORDER BY Clause
Sorting query results using ORDER BY
Sorting by multiple columns
Specifying ascending and descending order
12.5 Aggregate Functions
Calculating aggregate values (e.g., SUM, AVG, COUNT, MAX, MIN)
Using aggregate functions with GROUP BY clause
Filtering grouped data with HAVING clause
12.6 Joins
Performing inner joins between tables
Using aliases for table names
Performing outer joins (LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN)
12.7 Subqueries
Writing subqueries within SELECT, FROM, WHERE, and HAVING clauses
Correlated vs. non-correlated subqueries
Using subqueries for filtering and aggregation
12.8 Set Operations
Combining query results with UNION, INTERSECT, and EXCEPT
Understanding set operations and their usage
12.9 Conditional Expressions
Using CASE expressions for conditional logic
Handling NULL values with CASE
Conditional aggregation with CASE and aggregate functions
12.10 String Functions
Common string functions (e.g., CONCAT, SUBSTRING, UPPER, LOWER, REPLACE)
Manipulating string data in SQL queries
12.11 Date and Time Functions
Common date and time functions (e.g., DATEADD, DATEDIFF, GETDATE, CONVERT)
Formatting date and time values
12.12 Advanced SQL Techniques
Using window functions for advanced analytics (e.g., ROW_NUMBER, RANK, DENSE_RANK)
Recursive queries with Common Table Expressions (CTEs)
Dynamic SQL and parameterized queries
« Previous MongoDB Tutorial 11. Database Design and Modeling
13. Data Definition Language (DDL) Next MongoDB Tutorial »