Tag: SQL

HomeTagsSQL

Become a member

Get related updates from Syskool.

Understanding Joins in SQL

Table of Contents Introduction What is a Join in SQL? Why Do We Use Joins? Types of Joins in SQL INNER JOIN Explained LEFT JOIN Explained RIGHT JOIN Explained FULL OUTER JOIN...

Basic Subqueries and Their Use Cases in SQL

Table of Contents Introduction What is a Subquery? Types of Subqueries Why Use Subqueries? Syntax of a Subquery Subqueries in SELECT Clause Subqueries in FROM Clause Subqueries in WHERE Clause Single-Row vs Multi-Row...

Using the IN, BETWEEN, and LIKE Operators in SQL

Table of Contents Introduction Why Use Conditional Operators? The Role of IN, BETWEEN, and LIKE Basic Syntax Recap The IN Operator IN with Numbers IN with Strings IN with Subqueries NOT IN Clause Performance...

Using the IN, BETWEEN, and LIKE Operators in SQL

Table of Contents Introduction Why Use Conditional Operators? The Role of IN, BETWEEN, and LIKE Basic Syntax Recap The IN Operator IN with Numbers IN with Strings IN with Subqueries NOT IN Clause Performance...

Aliasing Columns and Tables in SQL

Table of Contents Introduction What is an Alias in SQL? Why Use Aliases? Syntax of Aliases in SQL Column Aliases with AS Column Aliases Without AS Table Aliases with AS Table Aliases...

Filtering Groups with HAVING in SQL

Table of Contents Introduction What is the HAVING Clause? Difference Between WHERE and HAVING Why Use HAVING? Basic Syntax of HAVING Simple Example with HAVING Using HAVING with COUNT() Filtering on SUM()...

Grouping Data with GROUP BY in SQL

Table of Contents Introduction What is GROUP BY in SQL? Basic Syntax of GROUP BY When to Use GROUP BY Simple GROUP BY Example Grouping by One Column Grouping by Multiple...

Aggregate Functions in SQL: COUNT, SUM, AVG, MIN, MAX

Table of Contents Introduction What are Aggregate Functions? Syntax of Aggregate Functions Using COUNT() to Count Records Counting Non-NULL vs All Rows Using SUM() for Totaling Values Applying SUM() with Filters Using...

Table of Contents

Introduction What is NULL in SQL? NULL vs Zero vs Empty String Why NULL Exists in Databases Checking for NULL: IS NULL and IS NOT NULL Using NULL in...

Using LIMIT and OFFSET in SQL

Table of Contents Introduction What is the LIMIT Clause? Syntax of LIMIT Why Use LIMIT? Basic Example of LIMIT What is the OFFSET Clause? Syntax of LIMIT with OFFSET Practical Pagination with...

Sorting Results with ORDER BY in SQL

Table of Contents Introduction What is the ORDER BY Clause? Basic Syntax of ORDER BY Sorting in Ascending Order (ASC) Sorting in Descending Order (DESC) Default Sorting Behavior Sorting by Multiple...

Logical Operators in SQL: AND, OR, NOT

Table of Contents Introduction What Are Logical Operators in SQL? The Role of Logical Operators in Filtering Basic Syntax and Usage Using AND to Combine Conditions Using OR to Widen...

Categories