Master Oracle SQL: From Basics to Advanced Techniques
- Descrição
- Currículo
- FAQ
- Revisões
Expand Your SQL Toolkit – As you progress, you’ll delve into advanced query techniques such as using JOINS to combine data from multiple tables and GROUP BY to perform aggregate functions like counting, averaging, and summing data. Learn how to write powerful SQL queries that give you deeper insights into complex datasets.
In this course, you will:
-
Understand Data Fundamentals – Dive into the core concepts of data and databases. Learn what data is, how databases work, and their historical evolution to gain a solid foundation.
-
Master SQL Basics – Discover the history and benefits of SQL, and understand how it operates to interact with databases. This section covers essential SQL knowledge that will be vital throughout your data journey.
-
Learn Key Query Techniques – Get hands-on experience with the basics of SQL queries. Explore the SELECT statement, WHERE clause for filtering data, and ORDER BY for sorting results. These skills are crucial for effective data retrieval and analysis.
-
Explore SQL Data Types and NULL Values – Understand different SQL data types and learn how to handle NULL values in your queries, an important aspect of managing real-world data.
-
Gain Database Administration Skills – Learn to download, install, and set up Oracle Database using SQL Developer. Understand user and schema management, and how to connect to databases efficiently.
-
Understand Subqueries and Nested Queries – Enhance your SQL skills by mastering subqueries. You’ll learn how to write efficient queries that reference other queries, allowing you to extract more specific and useful data from your database.
-
Manipulate Data with DML (Data Manipulation Language) – Get comfortable with inserting, updating, and deleting data using INSERT, UPDATE, and DELETE commands. You’ll gain hands-on experience in modifying and maintaining data within databases, key skills for data analysts and database administrators alike.
-
Control Access with DDL (Data Definition Language) – Learn how to create and modify database structures using CREATE, ALTER, and DROP commands. You’ll also explore the GRANT and REVOKE commands to manage user permissions, a vital skill for maintaining database security and integrity.
-
Work with Functions and Expressions – Discover how to use built-in SQL functions for string manipulation, date handling, and performing mathematical operations. You’ll also learn about conditional expressions like CASE and how to integrate these tools into your queries to solve real-world data challenges.
-
Handle Transactions and Maintain Data Integrity – Learn how to manage database transactions using COMMIT, ROLLBACK, and SAVEPOINT to ensure data consistency and integrity, especially in multi-user environments. These concepts are essential for working with complex data systems and ensuring your data is accurate and reliable.
-
Master SQL with Real-World Scenarios – Throughout the course, you’ll work on practical exercises and real-world projects that simulate the challenges you’ll face in your data career. Whether it’s building reports, generating insights, or ensuring database security, this course provides the hands-on experience needed to apply SQL in real-world situations.
By the end of this course, you’ll be proficient in SQL and ready to tackle real-world data challenges with confidence. Whether you’re pursuing a career in data analytics, software development, or database administration, this course will give you the tools you need to succeed.
-
1Lesson IntroductionTexto
-
2What Is Data? Understanding Data in the Digital World.Vídeo Aula
In this lesson, we dive into the concept of data—the essential building blocks of the digital world. Through everyday examples like phone calls, Netflix, and Instagram, we'll uncover how data is present in every interaction we have. From your contacts list to online shopping history, data surrounds us and shapes our experiences. We’ll explore how data, in its various forms—names, numbers, images—comes together to create meaningful information that drives decisions and insights. By the end of this video, you'll have a clear understanding of what data is and why it's fundamental in today’s information-driven world.
-
3What Is a Database? Definition and Core Concepts.Vídeo Aula
In this lesson, we’ll explain what a database is using simple examples. Imagine you're a librarian, using a notebook to keep track of books, who borrowed them, and when they need to be returned. This notebook is like a small database for your library.
Next, we’ll look at how a business, like an online store, uses a database to manage products, customer orders, and supplier information. A database helps keep everything organized, so it’s easy to find information when needed.
By the end of this video, you’ll have a clear understanding of what databases are and how they help us store and organize data in everyday situations.
-
4The History of Databases: From Early Systems to Modern Solutions.Vídeo Aula
In this lesson, we’ll explore the history of databases and how data storage has evolved over time. We’ll start from the early days before computers, when people used punch cards and magnetic tapes to store information. Then, we’ll dive into a major breakthrough in the 1970s, when Edgar Codd introduced the relational database — a way to organize data into tables that’s still widely used today.
We’ll also discuss the rise of relational database management systems (RDBMS), created by companies like IBM and Oracle, which helped handle large amounts of data accurately. Fast-forward to 2010, we’ll look at the challenges of Big Data and how systems like Apache Hadoop and Spark made it possible to process huge datasets.
Finally, we’ll cover how cloud computing transformed databases, with services from Amazon, Microsoft, and Google making it easier to store and manage data online. This video will show you the journey of databases from simple beginnings to powerful, cloud-based tools we rely on today.
-
5Real-World Examples of Database Usage Across Industries.Vídeo Aula
In this lesson, we dive into the story of Logic Link, a company overwhelmed by scattered data across different departments. Without a unified system, the finance, marketing, and operations teams each had their own isolated data, creating a confusing and inefficient environment. Decision-makers struggled to see the full picture, slowing down teamwork and making informed choices difficult.
But things changed when Logic Link introduced Oracle Database. Think of it as organizing scattered books in a library. By centralizing all data in Oracle Database, the company gained a single, unified view. Now, each department had access to the same information, enabling better collaboration and faster, smarter decisions.
With Oracle Database, Logic Link transformed its approach. Marketing could personalize customer interactions, boosting satisfaction and loyalty. Operations improved inventory management, cutting costs, and ensuring timely deliveries. This once-disorganized company turned into a success story of efficiency and clarity, all thanks to Oracle Database.
-
6Basic Database Terminology: Tables, Rows, and Columns Explained.Vídeo Aula
In this lesson, we explore the world of databases through the example of a grocery store's inventory system, "Fresh Mart." Imagine Fresh Mart's database as an organized, digital shopping list that tracks every item on the shelves. This database is structured into tables, rows, and columns—much like different sections in a store.
For instance, there’s a table called the "Produce Section" where each row represents a specific fruit, like "Juicy Apples" or "Sweet Berries." Each column contains details like the name, price, quantity, and expiration date of each item.
This setup allows Fresh Mart to easily manage inventory, track availability, and restock items when needed. By breaking down Fresh Mart's database, we see how databases make managing information simpler and more efficient—just like organizing a real grocery store.
-
7Leeson IntroductionTexto
-
8The History of SQL: How It Evolved Over Time.Vídeo Aula
In this lesson, we explore the fascinating history of SQL, or Structured Query Language, which began in the 1970s as a way to manage data in relational databases. Originally developed by IBM and first called "SEQUEL," SQL quickly became the standard language for database management. Recognized as an official standard by ANSI in 1986 and ISO in 1987, SQL's flexibility and power have made it essential for popular database systems like MySQL, PostgreSQL, and Oracle Database. Today, SQL remains a foundational tool in data management, reflecting its importance in an ever-evolving tech landscape.
-
9The Benefits of SQL: Why It’s Essential for Data Management.Vídeo Aula
In this video lesson, we'll dive into the significance of SQL (Structured Query Language) and its essential role in data management. SQL is a powerful tool that helps us interact with databases to create, retrieve, update, and delete data with precision and efficiency.
Think of SQL as a digital assistant that processes queries and delivers the requested information swiftly. Through real-world examples, such as managing a bookstore's inventory, we'll see how SQL simplifies complex tasks like searching, sorting, and filtering data, making it indispensable for anyone working with databases.
Whether you're handling small or large-scale data, SQL streamlines operations and enhances efficiency.
-
10How SQL Works: An Overview of SQL’s Role in Databases.Vídeo Aula
In this video lesson, we'll explore how SQL works within the context of database management. At the core of any database is the Database Management System (DBMS), which governs how data is stored, accessed, and managed. SQL acts as the tool used to interact with the DBMS, allowing you to send queries to retrieve or manipulate data. We'll walk through the process of how SQL queries are interpreted by the DBMS, how it searches and filters data across tables, and how the final results are returned to you. This process forms the foundation of database interactions, making SQL a vital part of modern data management.
-
11Exploring SQL Common Data TypesVídeo Aula
In this video lesson, we will explore the fundamental concept of DataTypes in SQL, which is essential for organizing and managing data within a database. We will discuss the role of DataTypes in defining and categorizing data characteristics, such as text, numbers, and dates, and how these influence the operations that can be performed on the data. Through real-world examples, including handling customer data, product inventories, and transaction dates, we will illustrate the practical use of DataTypes like CHAR, VARCHAR2, INT, FLOAT, DATE, TIMESTAMP, CLOB, and BLOB. By the end of this lesson, you will understand how choosing the right DataType ensures efficient data storage, retrieval, and manipulation, which is crucial for effective database management.
-
12Exploring NULL Values in SQLVídeo Aula
In this video lesson, we will explore the concept of NULL values in databases, which represent missing or undefined data. Using relatable examples, we'll explain how NULL acts as a placeholder for unknown or incomplete information. We'll discuss scenarios where data might be missing, such as in client records, employee pay structures, or patient details, and how NULL values differ from zero or empty strings. Additionally, we’ll look at the challenges NULL values present in SQL operations, like calculations, comparisons, and data analysis. By the end of this lesson, you will understand how to handle NULL values effectively in your queries, ensuring more accurate and reliable database management.
-
13Lesson IntroductionTexto
-
14SID vs Service Name: Key Differences in Oracle DatabasesVídeo Aula
In this lesson, we expand on the foundational concepts of connecting to an Oracle database by introducing the key identifiers used to establish a connection: the SID (System Identifier) and the Service Name. We'll explore when to use each of these, depending on whether you're connecting to a single-instance or a multiple-services database. Through real-world examples, we demonstrate how a small retail store might use an SID, while a larger enterprise with multiple clients would rely on service names. Additionally, we delve into Oracle's evolution, particularly with the introduction of the Multitenant Architecture in Oracle 12c and how this approach is utilized in Oracle 23c, which requires the use of Service Names for connection. This lesson will deepen your understanding of modern database connection strategies and the benefits of Oracle’s innovative architecture.
-
15Step-by-Step Guide: Downloading and Installing Oracle Database & SQL DeveloperVídeo Aula
In this lesson, we guide you through the process of setting up your development environment to begin working with Oracle SQL. The first step is to download and install Oracle's pre-built Developer Virtual Machine (VM) that comes with Oracle Database 23C. We’ll walk you through downloading VirtualBox, installing the Oracle VM Extension Pack, and importing the pre-built developer VM. This setup will provide you with a fully configured environment for composing and executing SQL statements, as well as managing development and post-development tasks. By the end of this lesson, you’ll have the tools in place to start working with Oracle SQL in a professional development environment.
-
16User and SchemaVídeo Aula
In this lesson, we’ll build upon the foundation established in our previous session where we set up Oracle Database and SQL Developer. Now that you’re equipped with the tools, we’ll explore the concept of organizing and managing data in Oracle SQL using schemas.
Think of a schema as a dedicated workspace for a user, much like how different individuals in a co-working space each have their own private workspace. We'll cover how schemas help structure and secure data by isolating it within specific user accounts. Additionally, we'll discuss the relationship between users and schemas, and how multiple users can share a schema when appropriate. By the end of this lesson, you’ll understand the importance of schemas in maintaining a well-organized and secure Oracle database environment.
-
17How to Connect to a Database: A Beginner’s Guide to Oracle SQLVídeo Aula
In this lesson, we walk you through the process of starting up your recently installed Oracle Database Developer Virtual Machine and connecting to your Oracle database. We begin by configuring essential settings for optimal performance, such as adjusting allocated RAM and processors. Once the virtual machine is up and running, we guide you through extracting key connection details, including the Oracle SID, Pluggable DB information, and connection strings. Next, we focus on setting up Oracle SQL Developer as your SQL editor, demonstrating how to download, install, and configure a new database connection using the HR schema. You'll learn how to test the connection, resolve common errors related to the SID, and successfully establish a working connection with both the HR and system schemas. By the end of this session, you'll be ready to start writing and executing SQL queries in Oracle SQL Developer.
-
18Lesson IntroductionTexto
-
19Understanding SQL Statements: The Foundation of Database QueriesVídeo Aula
In this session, we will dive into the fundamentals of SQL (Structured Query Language) and how it allows us to manage and query databases effectively. Building on previous lessons where we set up an Oracle database and installed the necessary tools, we will now explore how SQL interacts with the Database Management System (DBMS) to perform database operations.
You will learn about the core SQL statements that are essential for managing data within a database, including:
SELECT Statement: To retrieve data from the database.
CREATE Statement: For creating database objects like tables.
INSERT Statement: To add new records to tables.
DELETE Statement: To remove specific records.
UPDATE Statement: For modifying existing data.
COMMIT Statement: To permanently save changes to the database.
Throughout this lesson, we will discuss how these SQL statements are structured and how they allow you to interact with a database by issuing commands that the DBMS interprets and executes. By the end of the lesson, you’ll have a solid understanding of SQL’s role in querying and managing databases, setting the foundation for more advanced database operations.
Let’s get started!
-
20Basic syntax and structure of SQL queries.Vídeo Aula
In this lesson, we explore how to use SQL to query and retrieve specific data from a table. Imagine you're reflecting on your childhood memories, stored in a table named "ChildhoodMemories," with columns such as "Event," "Date," and "Location." Using SQL, we’ll focus on the SELECT statement to fetch details from this table, showcasing how SQL allows you to interact with your data effectively.
The SELECT statement consists of two key components: the SELECT keyword, which defines the data to be retrieved, and the FROM keyword, which specifies the table from which to fetch the data. Understanding how to structure this query is fundamental, as it’s the first step in extracting meaningful information from a database.
In this session, you’ll also learn about the result set, the collection of data returned after executing the SELECT query. The result set includes the rows and columns that meet the criteria of the query, presenting the information in a structured format.
Additionally, we’ll discuss SQL clauses, starting with the FROM clause. Clauses are essential parts of SQL statements that enhance their functionality. While many clauses are optional, the FROM clause is mandatory in every SQL query to specify the source of the data.
By the end of this lesson, you’ll understand how to write basic SQL queries and retrieve the specific data you need from any table. This foundational knowledge is crucial for efficiently managing and analyzing data in databases.
-
21How to Use Column Aliases in SQL for Better Readability.Vídeo Aula
In this lesson, we explore the concept of column aliases in SQL, which allow you to assign temporary or alternative names to columns in your query results. For example, if you want the "customer_name" column to appear as "Full_Name" and the "email" column as "email_address" in the result set, you can use column aliases. By adding the AS keyword followed by the desired alias, you can customize the column headers in your output.
Additionally, we'll discuss how the AS keyword is optional, and you can omit it while still achieving the same result. However, if you want to preserve the case sensitivity of your column aliases, it’s essential to enclose the alias in double quotes. We’ll also cover the restriction of using spaces in aliases without quotes and demonstrate how to resolve any errors related to alias formatting.
By the end of this lesson, you'll understand how to modify column names in SQL result sets using aliases, making your output more readable and tailored to your needs.
-
22Using the Asterisk (*) in SQL: Selecting All Columns EfficientlyVídeo Aula
In this lesson, we dive into a useful shortcut in SQL for retrieving all columns from a table without explicitly listing each one. While you can select specific columns by naming them individually, the asterisk (*) serves as a wildcard to select all columns at once. For example, instead of typing each column name, you can simply use the query SELECT * FROM ChildhoodMemories to fetch all attributes at once.
We'll also explore a practical example where the asterisk is invaluable, such as in an e-commerce scenario, where you need to analyze a table with many columns, like customer orders. Using the asterisk in SQL makes data retrieval faster and more efficient, especially when you're exploring a dataset comprehensively. This lesson highlights how the asterisk can save time and simplify queries, making it a powerful tool in your SQL toolkit.
-
23Understanding the DUAL Table in SQL: Why and How It’s UsedVídeo Aula
In this lesson, we explore how to use the DUAL table in Oracle SQL for efficient, simple calculations. We’ll look at how performing calculations directly on real tables can lead to redundant data and inefficiency, especially when using multiple rows. Instead, the DUAL table allows for a more streamlined approach by providing a single row and column, enabling quick calculations without unnecessary repetition. Through examples like calculating event costs and discounts, we demonstrate how to apply arithmetic operations using the DUAL table and how to use parentheses to ensure correct order of operations. This lesson emphasizes the power of DUAL for quick, one-off calculations in SQL.
-
24What Is ROWNUM in SQL? A Guide to Row NumberingVídeo Aula
This lesson introduces the concept of ROWNUM in Oracle SQL, a useful feature that provides a unique sequential identifier to each row in a result set. By using ROWNUM, we can easily assign numbers to rows as they are returned from the database, which is essential for creating ordered lists or performing row-specific operations. Through practical examples, we’ll see how ROWNUM works in action when querying data from the 'ChildhoodMemories' table, and discuss its temporary nature. We also touch on how ROWNUM interacts with other SQL commands to enhance query efficiency and control.
-
25Using DISTINCT in SQL: How to Eliminate Duplicate RecordsVídeo Aula
In this lesson, we dive into the DISTINCT keyword in Oracle SQL, which is essential for eliminating duplicate values from query results. We demonstrate how to use DISTINCT to extract only unique values from a specific column, helping to refine data and improve reporting or analysis tasks. By applying DISTINCT to real-world scenarios, such as retrieving unique product IDs from an e-commerce database, we show how this command simplifies data analysis and reduces redundancy. This lesson also highlights the correct syntax and usage of DISTINCT to ensure clarity and precision in query results.
-
26Adding Comments in SQL: Best Practices for Clearer CodeVídeo Aula
In this lesson, we focus on the importance and practical uses of comments in SQL. Building on our previous understanding of the SELECT statement, we explore how to make queries clearer and more maintainable through effective documentation. Using comments can be especially useful for explaining query logic, providing context, or preserving code for future reference.
The session covers two main types of comments:
Single-line comments (--) – for brief, in-line annotations.
Multi-line comments (/* ... */) – for more detailed notes or to disable multiple lines of code.
By the end of this lesson, you'll learn how to use comments to improve code readability, facilitate collaboration, and make future maintenance easier.
-
27Lesson IntroductionTexto
-
28Mastering the WHERE Clause in SQL A Complete IntroductionVídeo Aula
In this video lesson, we build on our foundational SQL knowledge, taking a deeper dive into the power of the WHERE clause to filter and retrieve only the data you need from a table.
Starting from basic SQL concepts, such as the SELECT statement, column aliases, and the asterisk symbol for selecting all columns, we also review the DISTINCT keyword for eliminating duplicates and the role of ROWNUM for sequential numbering. We further revisit the DUAL table to demonstrate quick calculations.
Now, we shift focus to scenarios requiring specific search criteria, introducing the WHERE clause as a tool for setting conditions to selectively filter rows. With practical examples, including filtering inventory items by low stock, selecting employee records based on experience, and retrieving specific events from a “Childhood Memories” table, we illustrate how comparison operators like =, <>, >, and <= create powerful conditional queries.
By the end of this lesson, you’ll understand how to implement the WHERE clause to control the data you retrieve, applying filters to focus on only what’s relevant for your queries.
-
29How to Use the BETWEEN Operator for Range Matching in SQLVídeo Aula
In this lesson, we dive into the BETWEEN operator—a powerful tool for filtering data within a specified range. Building on our last session with comparison operators, we’ll explore how BETWEEN allows for efficient, inclusive filtering in scenarios where precise date or numeric ranges are essential.
We'll start with a practical scenario of sorting through memory records, such as identifying moments between 2010 and 2015. Then, we’ll apply BETWEEN to manage product inventory within a quantity range, retrieve sales data within specific quarters, and track projects with durations over 12 months. Each example highlights how the BETWEEN operator simplifies range-based queries, whether for dates, numbers, or other data types.
By the end of this lesson, you'll understand how to leverage BETWEEN to enhance data accuracy and streamline reporting in SQL.
-
30Matching Multiple Values in SQL with the IN OperatorVídeo Aula
In this lesson, we revisit the powerful IN Operator in SQL, which allows us to filter and retrieve specific sets of values without writing multiple queries. We'll start by reviewing our previous use of the BETWEEN operator, which helped us pull memories from a time range, and then explore how the IN operator offers even more precision. Using practical examples, from retrieving specific events in a “Childhood Memories” database to targeted product recommendations in an e-commerce setting, we’ll demonstrate the efficiency and flexibility of this operator. We'll also cover syntax best practices, including working with multiple data types, to make data retrieval faster and more tailored.
-
31SQL LIKE Operator: Effective Pattern Matching TechniquesVídeo Aula
In this lesson, you'll dive into the powerful SQL LIKE operator for pattern matching, using examples of capturing memories, finding employees by initials, and product names with specific words. You'll learn to leverage % and _ wildcards for flexible string searches and explore how LIKE can filter data based on complex patterns in real-world scenarios. Additionally, we introduce the ESCAPE clause, essential for handling special characters like %, _, and . By the end of this video, you’ll confidently use SQL to search and retrieve data with precision, even in challenging cases requiring exact matches with special symbols.
-
32Handling Null Values in SQL: IS NULL and IS NOT NULL ExplainedVídeo Aula
In this lesson, we build on our previous exploration of pattern matching with the LIKE operator and introduce two essential SQL operators—IS NULL and IS NOT NULL—that help you understand the presence or absence of data in your database.
Our session opens with a practical example: a student database containing a 'graduation_date' field, where we identify students who have graduated versus those still on their academic journey. Through the IS NULL and IS NOT NULL operators, we extract insightful information about student graduation statuses.
We then transition to a real-world business scenario involving customer feedback analysis. Here, the IS NULL operator helps identify customers who haven't provided comments, allowing the company to follow up for insights. Conversely, the IS NOT NULL operator pinpoints customers who have shared feedback, enabling the business to analyze and enhance service quality based on actual customer input.
By the end of this lesson, you’ll gain a deeper understanding of how to use IS NULL and IS NOT NULL to drive insights, improve decision-making, and leverage data's full potential within your databases.
-
33Using the NOT Operator in SQL: NOT IN, NOT BETWEEN, and NOT LIKE ExplainedVídeo Aula
In this lesson, we expand on our knowledge of NULL values and introduce the versatile NOT operator. The NOT operator reverses the result of a condition, making it especially useful for refining SQL queries when combined with other operators like IN, LIKE, BETWEEN, and IS NULL.
We'll walk through several real-world examples to demonstrate how the NOT operator works in various scenarios. First, we exclude specific product IDs using NOT IN, refine pattern searches using NOT LIKE, and filter data ranges with NOT BETWEEN. Each case highlights how NOT helps exclude unwanted data from your results.
We also cover the importance of parentheses when using NOT with AND and OR to ensure the correct order of operations and achieve the desired results. By the end, you’ll have a clear understanding of how to apply the NOT operator to streamline queries and achieve precise filtering in your SQL tasks.
-
34Using the WHERE clause with multiple conditionsVídeo Aula
In this lesson, we continue our Oracle SQL learning journey by building on the WHERE clause to refine data retrieval with multiple conditions. Previously, we covered how to filter data using single criteria, like finding employees with specific years of experience. Today, we’ll dive deeper, focusing on combining conditions with AND and OR operators to refine our queries and control the data retrieved more precisely.
We’ll start by constructing queries that retrieve employees based on both experience and salary. Using examples, we’ll learn how to target employees with a minimum of five years of experience and a salary above $80,000. We’ll then introduce the AND operator to ensure records meet both conditions, and the OR operator for queries where at least one of the criteria is met.
For instance, we’ll examine scenarios to identify employees in the IT department earning above a certain threshold or with specified years of experience, demonstrating how to prioritize conditions using parentheses. This control over condition evaluation allows us to accurately tailor our results, capturing precisely the records we need.
By the end of this lesson, you’ll be able to apply these logical operators in combination with WHERE clauses to retrieve complex data sets effectively and efficiently.
-
35Lesson IntroductionTexto
Lesson Overview: Mastering the ORDER BY Clause in SQL
In this lesson on Essential SQL Query Techniques, we focus on the versatile ORDER BY clause, a fundamental tool for organizing SQL query results in a meaningful way. This lesson covers five key topics:
Sorting Query Results: Introduction to the ORDER BY clause, which allows us to sort query results in ascending or descending order, based on one or more columns.
Sorting Multiple Columns: Learn how to apply ORDER BY to multiple columns, enabling finer control by specifying a primary and secondary sorting criterion.
Sorting with NULL Values: Understand how NULL values are sorted by default, and how to use NULLS FIRST or NULLS LAST to customize the ordering of NULL entries.
Sorting DISTINCT Results: Explore how to sort unique values retrieved using the DISTINCT keyword, ensuring that deduplicated data is displayed in an organized manner.
ORDER BY with ROWNUM: See how ORDER BY works alongside ROWNUM, a pseudocolumn for row numbering, to facilitate tasks like pagination and ranking.
This lesson is split into two parts: an explanation session and a practice session to reinforce the concepts covered. Prepare to build a strong foundation in sorting techniques with the ORDER BY clause, a vital skill for effective data management in SQL. Let’s dive in!
-
36How to Sort Query Results Using the ORDER BY ClauseVídeo Aula
In this lesson, we’re diving into the power of the ORDER BY clause in SQL—a fundamental tool that helps transform raw data into organized, meaningful information. Building on our knowledge of the SELECT statement, we’ll explore how sorting data can make a huge difference in readability, analysis, and decision-making.
We'll start by examining why sorting matters, using examples that highlight how ORDER BY makes it easy to identify top sales, spot trends, and manage data effectively. We’ll learn how to arrange data by different columns—whether it's numbers, dates, or text—and apply ascending or descending order to customize results.
This lesson also covers pairing ORDER BY with the WHERE clause to sort specific subsets of data, making targeted analysis even simpler. By the end, you’ll be equipped to sort and organize data in ways that make your SQL queries even more impactful, setting a solid foundation for data-driven decisions in any business context.
-
37Sorting Multiple ColumnsVídeo Aula
In this lesson, we continue our exploration of Oracle SQL, diving deeper into the power of the ORDER BY clause for multi-criteria sorting. Building on our previous session, where we covered basic sorting techniques, we’ll now tackle scenarios that require arranging data by multiple columns, allowing for flexible and precise organization.
This lesson covers:
Multi-Criteria Sorting: How to use ORDER BY with multiple columns, specifying unique sort orders for each, such as ascending by department, descending by salary, and ascending by hiring date.
Sorting by Column Position: An efficient technique to order results based on the column position rather than the column name, useful in complex queries with multiple columns.
Using Column Aliases in Sorting: How to leverage aliases for columns in sorting, which can help simplify queries and enhance readability.
Through hands-on examples, you’ll learn how multi-criteria sorting enables better data management, from analyzing employee records to organizing freelancer information. This lesson equips you with the techniques needed to effectively order complex datasets, giving you greater control in data manipulation and enhancing your data analysis skills.
-
38Sorting with NULL ValuesVídeo Aula
In this lesson, we’re diving deeper into data handling techniques. In this lesson, we’ll explore how to sort data in tables that include NULL values, learning to navigate this common challenge in real-world databases.
Imagine a hospital database managing patient appointments, where missing follow-up dates are marked as NULL. By default, Oracle places NULLs last in ascending order, but we’ll show you how to control this behavior using NULLS FIRST or NULLS LAST options, positioning NULL values wherever best suits your analysis.
Through practical examples, you’ll see how to refine the ORDER BY clause to manage data with missing values. We’ll cover the complete syntax, explore ascending and descending order, and ensure you have the skills to keep data cleanly organized, no matter the dataset’s complexity.
By the end, you’ll be well-equipped to handle sorting challenges, mastering the ability to customize results to prioritize or de-emphasize NULL values as needed for your data analysis.
-
39Sorting DISTINCT ResultsVídeo Aula
In this lesson, we build on our previous work with sorting data containing NULL values and move into sorting unique data entries. Specifically, we’ll dive into practical applications of sorting unique values, starting with a university database example. Imagine you're a data analyst tasked with organizing faculty titles across various departments. Using SQL, we’ll explore how to retrieve and sort distinct titles to avoid duplication in reports. We’ll cover using DISTINCT to fetch unique faculty titles, organizing these values in ascending order, and understanding how to apply the ORDER BY clause effectively.
Additionally, we’ll look at retrieving unique pairs of titles and departments, revealing the diversity in faculty roles. Then, we’ll revisit an employee database to illustrate how to handle distinct values in different columns. Importantly, we’ll discuss a crucial SQL rule: when using DISTINCT, columns referenced in ORDER BY must be in the select list. This lesson provides valuable SQL techniques for handling distinct and ordered data, useful in any complex data analysis task.
-
40Using ORDER BY with ROWNUMVídeo Aula
In this video lesson, we’re building on our Oracle SQL knowledge by diving into the nuances of using ROWNUM alongside the ORDER BY clause. In the previous lesson, we explored sorting with distinct values, learning how to focus on unique entries like job titles and departments. Today, we’ll focus on understanding how ROWNUM and ORDER BY interact in SQL and how the order of operations affects query outcomes.
We’ll start by examining how ROWNUM is assigned before any sorting is applied, based on the natural order of data retrieval from the table. Adding an ORDER BY clause after ROWNUM assignment can lead to unexpected results, as the initial numbering doesn’t align with the final sorted output. By following examples with the Employees table, we’ll explore common mistakes and clarify how ROWNUM functions in various query scenarios.
This lesson emphasizes the importance of operation sequence in SQL and prepares you to use ROWNUM and ORDER BY effectively, especially when filtering and ordering rows simultaneously.
-
42Creating TablesVídeo Aula
-
43Altering TablesVídeo Aula
In this lesson, we revisit fundamental concepts of table creation in Oracle SQL and dive deeper into modifying and managing database tables. You'll learn how to handle real-world scenarios like adding, modifying, and renaming columns, as well as renaming tables for better structure and organization.
We begin by exploring the limitations of directly altering an existing table and introduce the powerful ALTER TABLE statement to:
Add new columns, such as email addresses.
Modify column data types to meet precision requirements.
Rename columns and tables for clarity and relevance.
Next, we discuss how to clean up and remove unnecessary database elements using:
ALTER TABLE DROP COLUMN to remove specific columns.
DROP TABLE to delete entire tables when they are no longer needed.
By the end of this lesson, you'll have a solid understanding of how to efficiently update and maintain your database schema to meet changing requirements while ensuring data integrity.
-
47The usage of primary keys and foreign keysVídeo Aula
-
48Understand the concept of combining data based on a conditionVídeo Aula
-
49Natural JoinVídeo Aula
-
50Join with the Using ClauseVídeo Aula
-
51Define what an INNER join is and its purpose. With Using ClauseVídeo Aula
-
52Mastering INNER Joins with the Using Clause: Expanded ExamplesVídeo Aula
-
53Define what an INNER join is and its purpose. With On ClauseVídeo Aula
-
54Define what an OUTER join is and its purpose.Vídeo Aula
-
55Define what a LEFT join is and its purpose.Vídeo Aula
-
56Define what a RIGHT join is and its purpose.Vídeo Aula
-
57Define what a FULL join is and its purpose.Vídeo Aula
-
58Self-JoinsVídeo Aula
-
59Non-EquijoinsVídeo Aula
-
60Understanding SQL Functions: What They Are and How They WorkVídeo Aula
-
61Getting Started with Single Row Functions in SQL: Transforming Data Row by RowVídeo Aula
-
62Built-in Numeric Functions: Using ROUND to Round NumbersVídeo Aula
-
63Built-in Numeric Functions: Truncating Numbers with TRUNCVídeo Aula
-
64Built-in Numeric Functions: Understanding CEIL and FLOORVídeo Aula
-
65Built-in String Functions: CONCAT, UPPER, LOWER, and INITCAPVídeo Aula
-
66Built-in String Functions: Removing Unnecessary Spaces with TRIMVídeo Aula
-
67Built-in String Functions: Formatting Strings with LPAD and RPADVídeo Aula
-
68Built-in String Functions: LENGTH and REPLACEVídeo Aula
-
69Built-in String Functions: Extracting Substrings with the SUBSTRING FunctionVídeo Aula
-
70Built-in String Functions: Using INSTR to Find Substring PositionsVídeo Aula
-
71Built-in String Functions: Advanced INSTR TechniquesVídeo Aula
-
72Built-in Date Functions: Using SYSDATE to Work with Current DatesVídeo Aula
-
73Built-in Date Functions: Retrieving Date Components with the EXTRACT FunctionVídeo Aula
-
74Built-in Date Functions: Adding Months to Dates with ADD_MONTHSVídeo Aula
-
75Built-in Date Functions: Calculating Date Differences with MONTHS_BETWEENVídeo Aula
-
76Built-in Date Functions: Finding Specific Days with NEXT_DAY and LAST_DAYVídeo Aula
-
77Built-in NULL-Handling Functions: Dealing with Null Values Using NVLVídeo Aula
-
78Built-in NULL-Handling Functions: Using NVL2 for Conditional Null HandlingVídeo Aula
-
79Built-in NULL-Handling Functions: Handling Multiple Values with COALESCEVídeo Aula
-
80Built-in NULL-Handling Functions: Using NULLIF to Compare and Handle NullsVídeo Aula
-
81Built-in Conversion Functions: Formatting Data with TO_CHARVídeo Aula
-
82Built-in Conversion Functions: Advanced TO_CHAR Techniques for FormattingVídeo Aula
