๐ Filtering and Sorting Data in Oracle SQL (Hands-on with Oracle Autonomous Database)

As part of my continued journey with Oracle Cloud, I explored how to filter and sort data using SQL queries in Oracle Autonomous Database. These operations are essential for retrieving meaningful information from large datasets.
๐ฏ Objective
The goal of this task was to:
Understand how to filter records using
WHERESort data using
ORDER BYPractice real-world SQL querying techniques
๐ป Step 1: Creating the Table
I created a table named employees:
CREATE TABLE employees (
emp_id NUMBER,
emp_name VARCHAR2(50),
salary NUMBER
);
๐งช Step 2: Inserting Sample Data
INSERT INTO employees VALUES (1, 'Ali', 50000);
INSERT INTO employees VALUES (2, 'Ahmed', 70000);
INSERT INTO employees VALUES (3, 'Sara', 60000);
๐ Step 3: Viewing All Records
SELECT * FROM employees;
๐ Step 4: Filtering Data using WHERE
SELECT * FROM employees WHERE salary > 55000;
This query filters employees with salaries greater than 55,000.
๐ฝ Step 5: Sorting Data using ORDER BY
SELECT * FROM employees ORDER BY salary DESC;
This sorts employees based on salary in descending order.
๐ก What I Learned
How to filter data using WHERE clause
How to sort data using ORDER BY
Writing efficient SQL queries in Oracle
๐ Conclusion
This hands-on activity helped me understand how to retrieve and organize data effectively using Oracle SQL. These operations are fundamental for real-world database applications.





