{"id":2415,"date":"2022-03-21T08:01:16","date_gmt":"2022-03-21T12:01:16","guid":{"rendered":"https:\/\/www.nytechnologist.com\/beyondthebasics\/?page_id=2415"},"modified":"2025-10-04T12:19:55","modified_gmt":"2025-10-04T16:19:55","slug":"oracle-sql-developer-web-programming","status":"publish","type":"page","link":"https:\/\/www.nytechnologist.com\/beyondthebasics\/oracle-sql-developer-web-programming\/","title":{"rendered":"Oracle SQL Developer Web Programming"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Small Business Accounting<\/h2>\n\n\n\n<p>STUDENT01<\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student01\/_sdw\">https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student01\/_sdw<\/a><\/p>\n\n\n\n<p>STUDENT02<\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student02\/_sdw\">https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student02\/_sdw<\/a><\/p>\n\n\n\n<p>STUDENT03<\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student03\/_sdw\">https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student03\/_sdw<\/a><\/p>\n\n\n\n<p>STUDENT04<\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student04\/_sdw\">https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student04\/_sdw<\/a><\/p>\n\n\n\n<p>STUDENT05<\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student05\/_sdw\">https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student05\/_sdw<\/a><\/p>\n\n\n\n<p>STUDENT06<\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student06\/_sdw\">https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student06\/_sdw<\/a><\/p>\n\n\n\n<p>STUDENT07<\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student07\/_sdw\">https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student07\/_sdw<\/a><\/p>\n\n\n\n<div class=\"wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Intermediate Oracle SQL Workshop<\/h1>\n\n\n\n<p>Saturday 6-7-2025<\/p>\n\n\n\n<p>Modify the Essential Oracle SQL Developer Web code examples below from 12-18-2024<\/p>\n\n\n\n<p>Provide the required privileges to the tables.&nbsp; For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GRANT SELECT, INSERT, UPDATE, DELETE ON JUAN.INTERM_FEEDBACK TO STUDENT06<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<p><\/p>\n\n\n\n<p>Below is an&nbsp;<strong>organized, tabulated list<\/strong>&nbsp;of essential SQL code examples using the&nbsp;<strong>My Three Sons Tutoring Group&nbsp;<\/strong>data model as the context. Each example demonstrates key SQL concepts, with explanations and sample code tailored for Oracle SQL Developer.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>1. DDL (Data Definition Language)<\/strong><\/p>\n\n\n\n<p>DDL commands define and modify the structure of database objects (e.g., tables, constraints).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Create Table<\/strong><\/td><td>CREATE TABLE Subjects ( Subject_ID NUMBER PRIMARY KEY, Subject_Name VARCHAR2(50) NOT NULL );<\/td><td>Creates a new table named&nbsp;Subjects&nbsp;with a primary key.<\/td><\/tr><tr><td><strong>Alter Table<\/strong><\/td><td>ALTER TABLE Students ADD Date_Of_Birth DATE;<\/td><td>Adds a new column&nbsp;Date_Of_Birth&nbsp;to the&nbsp;Students&nbsp;table.<\/td><\/tr><tr><td><strong>Drop Table<\/strong><\/td><td>DROP TABLE Feedback;<\/td><td>Deletes the&nbsp;Feedback&nbsp;table and all its data permanently.<\/td><\/tr><tr><td><strong>Add Constraint<\/strong><\/td><td>ALTER TABLE Payments ADD CONSTRAINT CHK_Amount CHECK (Amount &gt; 0);<\/td><td>Adds a check constraint to ensure&nbsp;Amountin&nbsp;Payments&nbsp;is greater than 0.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>2. DML (Data Manipulation Language)<\/strong><\/p>\n\n\n\n<p>DML commands manipulate data in database tables (e.g.,&nbsp;INSERT,&nbsp;UPDATE,&nbsp;DELETE,&nbsp;MERGE).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Insert Data<\/strong><\/td><td>INSERT INTO Tutors (First_Name, Last_Name, Subject, Hourly_Rate, Experience_Years) VALUES (\u2018John\u2019, \u2018Smith\u2019, \u2018Math\u2019, 50, 5);<\/td><td>Adds a new tutor to the&nbsp;Tutors&nbsp;table.<\/td><\/tr><tr><td><strong>Update Data<\/strong><\/td><td>UPDATE Sessions SET Cost = Duration * 60 WHERE Tutor_ID = 1;<\/td><td>Updates the&nbsp;Cost&nbsp;for all sessions conducted by a specific tutor.<\/td><\/tr><tr><td><strong>Delete Data<\/strong><\/td><td>DELETE FROM Payments WHERE Amount &lt; 50;<\/td><td>Deletes all payment records where the amount is less than 50.<\/td><\/tr><tr><td><strong>Merge Data<\/strong><\/td><td>MERGE INTO Students s USING (SELECT 5 AS Student_ID, \u2018Sue\u2019 AS First_Name, \u2018Brown\u2019 AS Last_Name , \u2018Susan@gmail.com\u2019 AS Email , \u2018555-1357\u2019 as Phone, \u2018Grade 11\u2019 as Grade_Level FROM dual) data ON (s.Student_ID = data.Student_ID) WHEN MATCHED THEN UPDATE SET First_Name = data.First_Name, Last_Name = data.Last_Name , Email = data.Email WHEN NOT MATCHED THEN INSERT (Student_ID, First_Name, Last_Name, Email , Phone,&nbsp; Grade_Level) VALUES (data.Student_ID, data.First_Name, data.Last_Name , data.Email, data.Phone, data.Grade_Level);<\/td><td>Merges data into&nbsp;Students: updates if the record exists, inserts if it doesn\u2019t.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>3. SELECT Queries (Basic and Advanced)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Basic SELECT<\/strong><\/td><td>SELECT First_Name, Last_Name FROM Students;<\/td><td>Retrieves the first and last names of all students.<\/td><\/tr><tr><td><strong>WHERE Clause<\/strong><\/td><td>SELECT * FROM Sessions WHERE Duration &gt; 2;<\/td><td>Retrieves sessions with a duration greater than 2 hours.<\/td><\/tr><tr><td><strong>ORDER BY<\/strong><\/td><td>SELECT * FROM Tutors ORDER BY Experience_Years DESC;<\/td><td>Retrieves all tutors, sorted by their years of experience in descending order.<\/td><\/tr><tr><td><strong>GROUP BY<\/strong><\/td><td>SELECT Grade_Level, COUNT(*) AS Student_Count FROM Students GROUP BY Grade_Level;<\/td><td>Groups students by grade level and counts the number of students in each grade level.<\/td><\/tr><tr><td><strong>HAVING Clause<\/strong><\/td><td>SELECT Tutor_ID, AVG(Cost) AS Avg_Cost FROM Sessions GROUP BY Tutor_ID HAVING AVG(Cost) &gt; 75;<\/td><td>Retrieves tutors whose average session cost is greater than 75.<\/td><\/tr><tr><td><strong>JOIN<\/strong><\/td><td>SELECT s.Student_ID, st.First_Name, st.Last_Name, t.First_Name AS Tutor_Name FROM Sessions s JOIN Students st ON s.Student_ID = st.Student_ID JOIN Tutors t ON s.Tutor_ID = t.Tutor_ID;<\/td><td>Combines data from&nbsp;Sessions,&nbsp;Students, and&nbsp;Tutors&nbsp;to show which student attended which session with which tutor.<\/td><\/tr><tr><td><strong>Subquery<\/strong><\/td><td>SELECT * FROM Tutors WHERE Hourly_Rate &gt; (SELECT AVG(Hourly_Rate) FROM Tutors);<\/td><td>Retrieves all tutors whose hourly rate is above the average hourly rate.<\/td><\/tr><tr><td><strong>Window Function<\/strong><\/td><td>SELECT Student_ID, First_Name, Last_Name, ROW_NUMBER() OVER (ORDER BY Student_ID) AS Row_Num FROM Students;<\/td><td>Assigns a row number to each student based on their&nbsp;Student_ID.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>4. Aggregation Queries<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Count Records<\/strong><\/td><td>SELECT COUNT(*) AS Total_Students FROM Students;<\/td><td>Counts the total number of students in the&nbsp;Students&nbsp;table.<\/td><\/tr><tr><td><strong>Sum Data<\/strong><\/td><td>SELECT SUM(Amount) AS Total_Revenue FROM Payments;<\/td><td>Sums up all payment amounts to calculate total revenue.<\/td><\/tr><tr><td><strong>Average<\/strong><\/td><td>SELECT AVG(Duration) AS Avg_Session_Duration FROM Sessions;<\/td><td>Calculates the average session duration.<\/td><\/tr><tr><td><strong>Min\/Max Values<\/strong><\/td><td>SELECT MIN(Hourly_Rate) AS Lowest_Rate, MAX(Hourly_Rate) AS Highest_Rate FROM Tutors;<\/td><td>Retrieves the lowest and highest hourly rates among tutors.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>5. Joins and Relationships<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>INNER JOIN<\/strong><\/td><td>SELECT s.First_Name, p.Amount FROM Students s INNER JOIN Payments p ON s.Student_ID = p.Student_ID;<\/td><td>Retrieves students along with their payment amounts.<\/td><\/tr><tr><td><strong>LEFT JOIN<\/strong><\/td><td>SELECT s.First_Name, p.Amount FROM Students s LEFT JOIN Payments p ON s.Student_ID = p.Student_ID;<\/td><td>Retrieves all students, including those who haven\u2019t made any payments (with&nbsp;NULL&nbsp;for Amount).<\/td><\/tr><tr><td><strong>RIGHT JOIN<\/strong><\/td><td>SELECT p.Amount, s.First_Name FROM&nbsp; Students s RIGHT JOIN&nbsp; Payments p&nbsp; ON s.Student_ID = p.Student_ID;<\/td><td>Retrieves all payments, including those not linked to any students (with&nbsp;NULL&nbsp;for Student details).<\/td><\/tr><tr><td><strong>FULL OUTER JOIN<\/strong><\/td><td>SELECT s.First_Name, p.Amount FROM Students s FULL OUTER JOIN Payments p ON s.Student_ID = p.Student_ID;<\/td><td>Combines&nbsp;LEFT JOIN&nbsp;and&nbsp;RIGHT JOIN, showing unmatched rows from both tables.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>6. Data Integrity and Validation<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Check Constraint<\/strong><\/td><td>ALTER TABLE Sessions ADD CONSTRAINT CHK_Duration CHECK (Duration &gt; 0);<\/td><td>Ensures that&nbsp;Duration&nbsp;in the&nbsp;Sessions&nbsp;table is always greater than 0.<\/td><\/tr><tr><td><strong>Unique Constraint<\/strong><\/td><td>ALTER TABLE Students ADD CONSTRAINT UC_Student_Email UNIQUE (Email);<\/td><td>Ensures that student emails are unique.<\/td><\/tr><tr><td><strong>Foreign Key<\/strong><\/td><td>ALTER TABLE Sessions ADD CONSTRAINT FK_Student FOREIGN KEY (Student_ID) REFERENCES Students(Student_ID);<\/td><td>Links the&nbsp;Sessions.Student_ID&nbsp;column to the&nbsp;Students.Student_ID&nbsp;column, enforcing referential integrity.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>7. Analytical and Reporting Queries<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Revenue by Tutor<\/strong><\/td><td>SELECT &nbsp;&nbsp;&nbsp; t.Tutor_ID, &nbsp;&nbsp;&nbsp; t.First_Name || \u2018 \u2018 || t.Last_Name AS Tutor_Name, &nbsp;&nbsp;&nbsp; SUM(s.Cost) AS Total_Revenue FROM &nbsp;&nbsp;&nbsp; Tutors t JOIN &nbsp;&nbsp;&nbsp; Sessions s ON t.Tutor_ID = s.Tutor_ID GROUP BY &nbsp;&nbsp;&nbsp; t.Tutor_ID, t.First_Name, t.Last_Name ORDER BY &nbsp;&nbsp;&nbsp; Total_Revenue DESC; &nbsp;&nbsp;&nbsp;<\/td><td>This query calculates the&nbsp;<strong>total revenue<\/strong>&nbsp;generated by each tutor by summing up the&nbsp;Cost&nbsp;column for all tutoring sessions conducted by that tutor.<\/td><\/tr><tr><td><strong>Top Students<\/strong><\/td><td>SELECT st.First_Name, st.Last_Name, COUNT(s.Session_ID) AS Total_Sessions FROM Students st JOIN Sessions s ON st.Student_ID = s.Student_ID GROUP BY st.First_Name, st.Last_Name ORDER BY Total_Sessions DESC;<\/td><td>Lists students with the most sessions, in descending order.<\/td><\/tr><tr><td><strong>Session Analysis<\/strong><\/td><td>SELECT Tutor_ID, AVG(Cost) AS Avg_Cost, MAX(Cost) AS Max_Cost FROM Sessions GROUP BY Tutor_ID;<\/td><td>Provides average and maximum session costs per tutor.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>8. Additional Features<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Create View<\/strong><\/td><td>CREATE VIEW Student_Payments AS SELECT s.First_Name, s.Last_Name, p.Amount FROM Students s JOIN Payments p ON s.Student_ID = p.Student_ID;<\/td><td>Creates a reusable view to quickly access student payment data.<\/td><\/tr><tr><td><strong>Index<\/strong><\/td><td>CREATE INDEX idx_sessions_date ON Sessions(Session_Date);<\/td><td>Creates an index on&nbsp;Session_Date&nbsp;to optimize query performance.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Summary<\/strong><\/p>\n\n\n\n<p>This tabulated list demonstrates key SQL concepts with practical examples tailored for the&nbsp;<strong>My Three Sons Tutoring Group LLC<\/strong>&nbsp;database. It covers foundational topics like&nbsp;<strong>DDL<\/strong>,&nbsp;<strong>DML<\/strong>,&nbsp;<strong>aggregations<\/strong>, and advanced SQL features like&nbsp;<strong>joins<\/strong>,&nbsp;<strong>constraints<\/strong>, and&nbsp;<strong>analytical queries<\/strong>, providing a comprehensive toolkit for database management and reporting.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Code to crate tables, primary key and foreigh key<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-f45f5a4b-cbbe-4692-a9c8-d438cc08a504\" href=\"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2025\/06\/001-Create-the-tables-v002-prefaced_PRINT-6-7-2025-Interm-SQL.txt\">001 Create the tables<\/a><a href=\"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2025\/06\/001-Create-the-tables-v002-prefaced_PRINT-6-7-2025-Interm-SQL.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-f45f5a4b-cbbe-4692-a9c8-d438cc08a504\">Download<\/a><\/div>\n\n\n\n<p>Code for data insertion and sample business queries<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-9a74ea48-c500-463a-8e94-19cf04e456c3\" href=\"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2025\/06\/002-Code-for-data-insertion-and-sample-business-queries-v005_PRINT-6-7-2025-Interm-SQL.txt\">002 Code for data insertion and sample business queries<\/a><a href=\"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2025\/06\/002-Code-for-data-insertion-and-sample-business-queries-v005_PRINT-6-7-2025-Interm-SQL.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-9a74ea48-c500-463a-8e94-19cf04e456c3\">Download<\/a><\/div>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Introduction to Oracle SQL <\/h1>\n\n\n\n<p>Fri 4-11-2025<\/p>\n\n\n\n<p>Hands on workshop<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Intro to Oracle Security features of privileges, grant and revoke<\/h1>\n\n\n\n<p>&#8212; Examples of grant privileges:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; GRANT SELECT ON JUAN.EXCEL_COURSE TO STUDENT06;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; GRANT SELECT ON JUAN.EXCEL_COURSE TO STUDENT01, &nbsp;STUDENT02, &nbsp;STUDENT03, &nbsp;STUDENT04, &nbsp;STUDENT05, &nbsp;STUDENT06;<\/p>\n\n\n\n<p>REVOKE SELECT ON JUAN.EXCEL_COURSE FROM STUDENT05;<\/p>\n\n\n\n<p>GRANT INSERT, UPDATE, DELETE ON HR.EMPLOYEES TO STUDENT01;<\/p>\n\n\n\n<p>&#8211;grant option to create a view<\/p>\n\n\n\n<p>GRANT CREATE VIEW TO STUDENT 01;<\/p>\n\n\n\n<p>&#8211;Grant privilege on view<\/p>\n\n\n\n<p>GRANT select ON V_Course_Offerings to STUDENT06;<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Practice Activity: Select Query<\/h1>\n\n\n\n<p>&#8211;view all the records in the table<\/p>\n\n\n\n<p>SELECT *<\/p>\n\n\n\n<p>FROM &nbsp; &nbsp; JUAN.Excel_Instructor;<\/p>\n\n\n\n<p>Now, view each table with a SELECT statement to see the data in each table.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">The Versatility of VIEWS<\/h1>\n\n\n\n<p>&#8211;View the course offering by running a select statement on a view:<\/p>\n\n\n\n<p>select * from V_Course_Offerings;<\/p>\n\n\n\n<p>&#8212; This is the code to create a view.&nbsp; Views are essentially saved and shareable queries.&nbsp; The view can be created by one user and that user can grant select access to others.<\/p>\n\n\n\n<p>CREATE OR REPLACE VIEW V_Course_Offerings AS<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp; s.section_id,<\/p>\n\n\n\n<p>&nbsp; c.course_id,<\/p>\n\n\n\n<p>&nbsp; c.title AS course_title,<\/p>\n\n\n\n<p>&nbsp; t.term_id,<\/p>\n\n\n\n<p>&nbsp; i.first_name || &#8216; &#8216; || i.last_name AS instructor_name,<\/p>\n\n\n\n<p>&nbsp; r.room_number,<\/p>\n\n\n\n<p>&nbsp; b.name AS building,<\/p>\n\n\n\n<p>&nbsp; ts.days_of_week || &#8216; &#8216; || ts.start_time || &#8216;-&#8216; || ts.end_time AS time_slot,<\/p>\n\n\n\n<p>&nbsp; s.max_enrollment<\/p>\n\n\n\n<p>FROM Excel_Section s<\/p>\n\n\n\n<p>JOIN Excel_Course c ON s.course_key = c.course_key<\/p>\n\n\n\n<p>JOIN Excel_Term t ON s.term_id = t.term_id<\/p>\n\n\n\n<p>JOIN Excel_Instructor i ON s.instructor_key = i.instructor_key<\/p>\n\n\n\n<p>JOIN Excel_Room r ON s.room_id = r.room_id<\/p>\n\n\n\n<p>JOIN Excel_Building b ON r.building_id = b.building_id<\/p>\n\n\n\n<p>JOIN Excel_Timeslot ts ON s.timeslot_id = ts.timeslot_id;<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Practice Activity: Insert Data using INERST INTO<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Add two courses<\/h2>\n\n\n\n<p>&#8211;ACTIVITY &#8211; Exercise &#8212;<\/p>\n\n\n\n<p>&#8211;insert a three new course by modifying the insert query script below<\/p>\n\n\n\n<p>INSERT INTO<\/p>\n\n\n\n<p>Excel_Course (course_id, title, credits, department)<\/p>\n\n\n\n<p>VALUES<\/p>\n\n\n\n<p>(&#8216;Oracle101&#8217;, &#8216;Introduction to Oracle&#8217;, 4, &#8216;Computer Science&#8217;);<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add one instructor<\/h2>\n\n\n\n<p>INSERT INTO Excel_Instructor (instructor_id, first_name, last_name, email)<\/p>\n\n\n\n<p>VALUES<\/p>\n\n\n\n<p>(&#8216;I001&#8217;, &#8216;Prof&#8217;, &#8216;Smith&#8217;, &#8216;smith@example.edu&#8217;);<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Practice Activity: Update a record using UPDATE query<\/h1>\n\n\n\n<p>&#8211;update the name of an instructor by modifying this code<\/p>\n\n\n\n<p>UPDATE Excel_Instructor<\/p>\n\n\n\n<p>SET last_name = &#8216;Astrab&#8217;<\/p>\n\n\n\n<p>WHERE instructor_key &nbsp;= 4;<\/p>\n\n\n\n<p>&#8211;ACTIVITY &#8211; Exercise &#8212; now update an email<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Practice Activity: Run this Aggregate query to get Enrollment per course<\/h1>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp; &nbsp; c.course_id,<\/p>\n\n\n\n<p>&nbsp; &nbsp; c.title,<\/p>\n\n\n\n<p>&nbsp; &nbsp; COUNT(e.enrollment_id) AS total_enrollments<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp; &nbsp; Excel_Course c<\/p>\n\n\n\n<p>JOIN<\/p>\n\n\n\n<p>&nbsp; &nbsp; Excel_Section s ON s.course_key = c.course_key<\/p>\n\n\n\n<p>JOIN<\/p>\n\n\n\n<p>&nbsp; &nbsp; Excel_Enrollment e ON e.section_id = s.section_id<\/p>\n\n\n\n<p>GROUP BY<\/p>\n\n\n\n<p>&nbsp; &nbsp; c.course_id, c.title<\/p>\n\n\n\n<p>ORDER BY<\/p>\n\n\n\n<p>&nbsp; &nbsp; total_enrollments DESC;<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Practice Activity: Insert new sections for the next semester by modifying the following code<\/h1>\n\n\n\n<p>&#8211;ACTIVITY &#8211; Exercise \u2013 &nbsp;<\/p>\n\n\n\n<p>INSERT INTO Excel_Section(section_id, course_key, term_id, instructor_key, room_id, timeslot_id, max_enrollment)<\/p>\n\n\n\n<p>VALUES (&#8216;SEC_000001&#8217;, 1, &#8216;2024FA&#8217;, 1, &#8216;R101&#8217;, &#8216;TS1&#8217;, 30);<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Practice Activity: Deleting Records<\/h1>\n\n\n\n<p>ADD instructor Z<\/p>\n\n\n\n<p>INSERT INTO Excel_Instructor (instructor_id, first_name, last_name, email)<\/p>\n\n\n\n<p>VALUES<\/p>\n\n\n\n<p>(&#8216;I00Z&#8217;, &#8216;Prof&#8217;, &#8216;Z&#8217;, &#8216;Z@example.edu&#8217;);<\/p>\n\n\n\n<p>DELETE FROM Excel_Instructor<\/p>\n\n\n\n<p>WHERE last_name = &#8216;Z&#8217;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Introduction to Oracle SQL <\/h1>\n\n\n\n<p>12-18-2024<\/p>\n\n\n\n<p><strong>Data is at the core of this data management system. This class will focus on tables, SQL queries, data access, and the Oracle SQL Developer Web Interface.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Structured Query Language<\/strong>&nbsp;(<strong>SQL<\/strong>) is a domain-specific language used to manage data, especially in a relational database management system (RDBMS).<\/li>\n\n\n\n<li><strong>Oracle Cloud Infrastructure (OCI)<\/strong> is a cloud computing service that provides a complete cloud infrastructure for building, testing, deploying, and managing applications and services:<\/li>\n<\/ul>\n\n\n\n<p><strong>OCI Features&nbsp;&nbsp;&nbsp;<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; High performance and predictability<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; On-demand throughput and storage provisioning<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; A flexible overlay virtual network<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; A variety of cloud services, including multi-cloud, public cloud, hybrid cloud, and dedicated cloud<\/p>\n\n\n\n<p><strong>OCI Benefits help users:<\/strong><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Run applications faster and more securely<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Build and run a range of applications and services in a highly available hosted environment<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Access services securely from their on-premises network<\/p>\n\n\n\n<p><strong>You should be aware of the key points as we focus on Oracle SQL Developer Web&#8217;s data management systems:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You will need an internet connection and the URL (uniform resource locator) to where the SQL database resides.<\/li>\n\n\n\n<li>Everything is on your browser.&nbsp; OCI works well on tablets, too, for convenience and portability.<\/li>\n\n\n\n<li>Oracle rest data services \u201cPowered by ORDS\u201d enables powerful state-of-the-art hooks into the web.<\/li>\n\n\n\n<li>Many core functionalities, but not all desktop features, are available on the SQL developer web.<\/li>\n<\/ul>\n\n\n\n<p>The goal is to use Oracle SQL developer with an internet connection.&nbsp; No software installation is required since it runs off web pages.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">INTRODUCTION TO ORACLE SQL DEV WEB&nbsp; <\/h1>\n\n\n\n<p>DATA QUERIES AND DATABASE MANAGEMENT <\/p>\n\n\n\n<p>12-18-2024<\/p>\n\n\n\n<p>Prerequisites: proficient with a web browser and basic Microsoft Excel experience or equivalent<\/p>\n\n\n\n<p>Oracle SQL developer on the web vs. Microsoft Access database application on the desktop.&nbsp; <strong>What are the differences between Oracle SQL Developer and MS Access?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Feature<\/strong><\/td><td><strong>Oracle SQL Developer (Web application)<\/strong><\/td><td><strong>MS Access (Desktop application)<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Purpose<\/strong><\/td><td>Oracle SQL Developer is a tool designed for managing and querying Oracle databases. It provides features to handle complex queries, PL\/SQL development, and large-scale database management.<\/td><td>MS Access is a desktop-based relational database system ideal for small to medium-sized applications and users who need to build simple databases with basic queries and reports.<\/td><\/tr><tr><td><strong>Scalability<\/strong><\/td><td>Oracle SQL Developer handles large enterprise-level databases with millions of records and complex queries. It is ideal for robust, distributed environments.<\/td><td>MS Access is more suitable for small databases and personal use, with limits on the number of records and concurrent users.<\/td><\/tr><tr><td><strong>Multi-user Support<\/strong><\/td><td>Supports thousands of users simultaneously, with strong concurrency control and user management features.<\/td><td>Limited to a small number of concurrent users (around 10-20 depending on usage), with scalability issues in multi-user environments.<\/td><\/tr><tr><td><strong>Query Language<\/strong><\/td><td>Uses PL\/SQL (Procedural Language for SQL) for more advanced database logic, which is more powerful than standard SQL alone.<\/td><td>Uses standard SQL with basic querying capabilities, and offers VBA for scripting tasks but lacks complex functionality.<\/td><\/tr><tr><td><strong>Interface<\/strong><\/td><td>Oracle SQL Developer has a web-based interface (SQL Developer Web) and a desktop version, providing extensive database management tools, including RESTful services, data modeling, and performance analysis.<\/td><td>MS Access is desktop-based with a user-friendly interface that focuses on building simple queries, forms, and reports, targeting non-technical users.<\/td><\/tr><tr><td><strong>Export\/Import<\/strong><\/td><td>Extensive export options (CSV, Excel, XML, JSON), plus direct database links for data integration.<\/td><td>Export options are more limited, typically supporting CSV, Excel, and text files, with some support for ODBC connections.<\/td><\/tr><tr><td><strong>Strengths<\/strong><\/td><td>Highly scalable, supports advanced database logic, enterprise-grade security, and handles complex database systems efficiently.<\/td><td>Easy to use for beginners, especially for small-scale applications, with built-in GUI tools for designing tables and queries.<\/td><\/tr><tr><td><strong>Weaknesses<\/strong><\/td><td>More complex to learn for beginners, requires some knowledge of PL\/SQL and Oracle database administration.<\/td><td>Not suitable for large-scale databases or multi-user environments; limited functionality for advanced users.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>The hands-on workshop empowers participants to run SELECT queries.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h1 class=\"wp-block-heading\">Introduction to Oracle SQL Developer for the Web<\/h1>\n\n\n\n<p>12-18-2024<\/p>\n\n\n\n<p><strong>Lesson Plan: Introduction to Oracle SQL Developer Web: Data Queries and Database Management<\/strong><\/p>\n\n\n\n<p><strong>Prerequisites:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Proficient with web browsers<\/li>\n\n\n\n<li>Basic experience with Microsoft Excel or equivalent<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Lesson Plan Overview<\/strong><\/p>\n\n\n\n<p><strong>Objective:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>By the end of this session, participants will be able to navigate Oracle SQL Developer Web, execute SQL queries, and import data<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Session Breakdown<\/strong><\/p>\n\n\n\n<p><strong>Introduction &amp; Objectives<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Interface navigation<\/li>\n\n\n\n<li>Running SQL queries<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Module 1: Getting Started with Oracle SQL Developer Web (20 mins)<\/strong><\/p>\n\n\n\n<p><strong>Topics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Logging in to Oracle SQL Developer Web<\/li>\n\n\n\n<li>Exploring the Dashboard and interface components\n<ul class=\"wp-block-list\">\n<li>Navigation Menu<\/li>\n\n\n\n<li>SQL worksheet<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>Hands-on Activity:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Walkthrough of navigating the interface<\/li>\n\n\n\n<li>Opening the worksheet for query execution<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Module 2: Running SQL Queries and Scripts<\/strong><\/p>\n\n\n\n<p><strong>Topics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Writing basic SQL SELECT statements<\/li>\n\n\n\n<li>Executing scripts to manage and manipulate data<\/li>\n<\/ul>\n\n\n\n<p><strong>Hands-on Activity:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Write and execute a simple SELECT query to retrieve data from an example table<\/li>\n<\/ul>\n\n\n\n<p>SELECT employee_id, first_name, last_name, department_id<\/p>\n\n\n\n<p>FROM employees<\/p>\n\n\n\n<p>WHERE department_id = 10;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Module 3: Advanced Query Techniques<\/strong><\/p>\n\n\n\n<p><strong>Topics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Aggregation functions: SUM, COUNT, AVG, MAX, MIN<\/li>\n\n\n\n<li>Grouping and filtering data using GROUP BY and HAVING<\/li>\n<\/ul>\n\n\n\n<p><strong>Hands-on Activity:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Example: Joining employees and departments tables to retrieve department names:<\/li>\n<\/ul>\n\n\n\n<p>SELECT department_id, COUNT(employee_id) AS total_employees<\/p>\n\n\n\n<p>FROM employees<\/p>\n\n\n\n<p>GROUP BY department_id<\/p>\n\n\n\n<p>HAVING COUNT(employee_id) &gt; 5;<br><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Module 4: Exporting Data<\/strong><\/p>\n\n\n\n<p><strong>Topics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Exporting query results to CSV, Excel, and JSON formats<\/li>\n\n\n\n<li>Configuring export options and managing file formats<\/li>\n<\/ul>\n\n\n\n<p><strong>Hands-on Activity:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Example of exporting employee data to CSV:\n<ul class=\"wp-block-list\">\n<li>Run query:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>SELECT employee_id, first_name, last_name, department_id<\/p>\n\n\n\n<p>FROM employees;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Export the result to a CSV file:\n<ul class=\"wp-block-list\">\n<li>Navigate to &#8220;Export&#8221; in the worksheet<\/li>\n\n\n\n<li>Select format (CSV, XLS, etc.)<\/li>\n\n\n\n<li>Save the file<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Conclusion &amp; Q&amp;A &nbsp;<\/strong>Recap of key concepts<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Examples<\/strong><\/p>\n\n\n\n<p><strong>1. Navigating Oracle SQL Developer Web<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Login<\/strong>: Open Oracle SQL Developer Web via a web browser, log in with credentials.<\/li>\n\n\n\n<li><strong>Navigate<\/strong>: Use the left navigation menu to access different features (SQL, Data Models).<\/li>\n\n\n\n<li><strong>Worksheet<\/strong>: Open the worksheet from the toolbar to begin writing queries.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>2. Running SQL Statements and Scripts<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Basic Query<\/strong>: Retrieve employee names from the EMPLOYEES table:<\/li>\n<\/ul>\n\n\n\n<p>SELECT first_name, last_name FROM employees;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>3. Export Data<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After running a query, export the result set by clicking the &#8220;Export&#8221; button.<\/li>\n\n\n\n<li>Choose the export format: CSV, XLS, or JSON.<\/li>\n\n\n\n<li>Save the exported data to your system for further use.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Work with the BBQ list Table<\/h1>\n\n\n\n<p>Select queries enable you to select all or specific columns<\/p>\n\n\n\n<p>Example, show all columns of table bbq<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>bbq.*<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>ADMIN.ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE_1 bbq;<\/p>\n\n\n\n<p>Shortcut:&nbsp; CTL with ENTER enables you to run a query.<\/p>\n\n\n\n<p>Example: Show specific columns<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>bbq.DESCRIPTION,<\/p>\n\n\n\n<p>bbq.CATEGORY,<\/p>\n\n\n\n<p>bbq.QUANTITY,<\/p>\n\n\n\n<p>bbq.UNIT_PRICE<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>ADMIN.ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE_1 bbq;<\/p>\n\n\n\n<p>Example: Multiply two columns to calculate a CALC_subtotal<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>bbq.DESCRIPTION,<\/p>\n\n\n\n<p>bbq.CATEGORY,<\/p>\n\n\n\n<p>bbq.QUANTITY,<\/p>\n\n\n\n<p>bbq.UNIT_PRICE<\/p>\n\n\n\n<p>bbq.QUANTITY * bbq.UNIT_PRICE CalculatedSubtotal<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>ADMIN.ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE_1 bbq;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Essential Oracle SQL Developer Web code examples<\/h2>\n\n\n\n<p>12-18-2024<\/p>\n\n\n\n<p>Below is an&nbsp;<strong>organized, tabulated list<\/strong>&nbsp;of essential SQL code examples using the&nbsp;<strong>My Three Sons Tutoring Group <\/strong>data model as the context. Each example demonstrates key SQL concepts, with explanations and sample code tailored for Oracle SQL Developer.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>1. DDL (Data Definition Language)<\/strong><\/p>\n\n\n\n<p>DDL commands define and modify the structure of database objects (e.g., tables, constraints).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Create Table<\/strong><\/td><td>CREATE TABLE Subjects ( Subject_ID NUMBER PRIMARY KEY, Subject_Name VARCHAR2(50) NOT NULL );<\/td><td>Creates a new table named&nbsp;Subjects&nbsp;with a primary key.<\/td><\/tr><tr><td><strong>Alter Table<\/strong><\/td><td>ALTER TABLE Students ADD Date_Of_Birth DATE;<\/td><td>Adds a new column&nbsp;Date_Of_Birth&nbsp;to the&nbsp;Students&nbsp;table.<\/td><\/tr><tr><td><strong>Drop Table<\/strong><\/td><td>DROP TABLE Feedback;<\/td><td>Deletes the&nbsp;Feedback&nbsp;table and all its data permanently.<\/td><\/tr><tr><td><strong>Add Constraint<\/strong><\/td><td>ALTER TABLE Payments ADD CONSTRAINT CHK_Amount CHECK (Amount &gt; 0);<\/td><td>Adds a check constraint to ensure&nbsp;Amountin&nbsp;Payments&nbsp;is greater than 0.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>2. DML (Data Manipulation Language)<\/strong><\/p>\n\n\n\n<p>DML commands manipulate data in database tables (e.g.,&nbsp;INSERT,&nbsp;UPDATE,&nbsp;DELETE,&nbsp;MERGE).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Insert Data<\/strong><\/td><td>INSERT INTO Tutors (First_Name, Last_Name, Subject, Hourly_Rate, Experience_Years) VALUES (&#8216;John&#8217;, &#8216;Smith&#8217;, &#8216;Math&#8217;, 50, 5);<\/td><td>Adds a new tutor to the&nbsp;Tutors&nbsp;table.<\/td><\/tr><tr><td><strong>Update Data<\/strong><\/td><td>UPDATE Sessions SET Cost = Duration * 60 WHERE Tutor_ID = 1;<\/td><td>Updates the&nbsp;Cost&nbsp;for all sessions conducted by a specific tutor.<\/td><\/tr><tr><td><strong>Delete Data<\/strong><\/td><td>DELETE FROM Payments WHERE Amount &lt; 50;<\/td><td>Deletes all payment records where the amount is less than 50.<\/td><\/tr><tr><td><strong>Merge Data<\/strong><\/td><td>MERGE INTO Students s USING (SELECT 5 AS Student_ID, &#8216;Sue&#8217; AS First_Name, &#8216;Brown&#8217; AS Last_Name , &#8216;Susan@gmail.com&#8217; AS Email , &#8216;555-1357&#8217; as Phone, &#8216;Grade 11&#8217; as Grade_Level FROM dual) data ON (s.Student_ID = data.Student_ID) WHEN MATCHED THEN UPDATE SET First_Name = data.First_Name, Last_Name = data.Last_Name , Email = data.Email WHEN NOT MATCHED THEN INSERT (Student_ID, First_Name, Last_Name, Email , Phone,&nbsp; Grade_Level) VALUES (data.Student_ID, data.First_Name, data.Last_Name , data.Email, data.Phone, data.Grade_Level);<\/td><td>Merges data into&nbsp;Students: updates if the record exists, inserts if it doesn\u2019t.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>3. SELECT Queries (Basic and Advanced)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Basic SELECT<\/strong><\/td><td>SELECT First_Name, Last_Name FROM Students;<\/td><td>Retrieves the first and last names of all students.<\/td><\/tr><tr><td><strong>WHERE Clause<\/strong><\/td><td>SELECT * FROM Sessions WHERE Duration &gt; 2;<\/td><td>Retrieves sessions with a duration greater than 2 hours.<\/td><\/tr><tr><td><strong>ORDER BY<\/strong><\/td><td>SELECT * FROM Tutors ORDER BY Experience_Years DESC;<\/td><td>Retrieves all tutors, sorted by their years of experience in descending order.<\/td><\/tr><tr><td><strong>GROUP BY<\/strong><\/td><td>SELECT Grade_Level, COUNT(*) AS Student_Count FROM Students GROUP BY Grade_Level;<\/td><td>Groups students by grade level and counts the number of students in each grade level.<\/td><\/tr><tr><td><strong>HAVING Clause<\/strong><\/td><td>SELECT Tutor_ID, AVG(Cost) AS Avg_Cost FROM Sessions GROUP BY Tutor_ID HAVING AVG(Cost) &gt; 75;<\/td><td>Retrieves tutors whose average session cost is greater than 75.<\/td><\/tr><tr><td><strong>JOIN<\/strong><\/td><td>SELECT s.Student_ID, st.First_Name, st.Last_Name, t.First_Name AS Tutor_Name FROM Sessions s JOIN Students st ON s.Student_ID = st.Student_ID JOIN Tutors t ON s.Tutor_ID = t.Tutor_ID;<\/td><td>Combines data from&nbsp;Sessions,&nbsp;Students, and&nbsp;Tutors&nbsp;to show which student attended which session with which tutor.<\/td><\/tr><tr><td><strong>Subquery<\/strong><\/td><td>SELECT * FROM Tutors WHERE Hourly_Rate &gt; (SELECT AVG(Hourly_Rate) FROM Tutors);<\/td><td>Retrieves all tutors whose hourly rate is above the average hourly rate.<\/td><\/tr><tr><td><strong>Window Function<\/strong><\/td><td>SELECT Student_ID, First_Name, Last_Name, ROW_NUMBER() OVER (ORDER BY Student_ID) AS Row_Num FROM Students;<\/td><td>Assigns a row number to each student based on their&nbsp;Student_ID.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>4. Aggregation Queries<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Count Records<\/strong><\/td><td>SELECT COUNT(*) AS Total_Students FROM Students;<\/td><td>Counts the total number of students in the&nbsp;Students&nbsp;table.<\/td><\/tr><tr><td><strong>Sum Data<\/strong><\/td><td>SELECT SUM(Amount) AS Total_Revenue FROM Payments;<\/td><td>Sums up all payment amounts to calculate total revenue.<\/td><\/tr><tr><td><strong>Average<\/strong><\/td><td>SELECT AVG(Duration) AS Avg_Session_Duration FROM Sessions;<\/td><td>Calculates the average session duration.<\/td><\/tr><tr><td><strong>Min\/Max Values<\/strong><\/td><td>SELECT MIN(Hourly_Rate) AS Lowest_Rate, MAX(Hourly_Rate) AS Highest_Rate FROM Tutors;<\/td><td>Retrieves the lowest and highest hourly rates among tutors.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>5. Joins and Relationships<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>INNER JOIN<\/strong><\/td><td>SELECT s.First_Name, p.Amount FROM Students s INNER JOIN Payments p ON s.Student_ID = p.Student_ID;<\/td><td>Retrieves students along with their payment amounts.<\/td><\/tr><tr><td><strong>LEFT JOIN<\/strong><\/td><td>SELECT s.First_Name, p.Amount FROM Students s LEFT JOIN Payments p ON s.Student_ID = p.Student_ID;<\/td><td>Retrieves all students, including those who haven\u2019t made any payments (with&nbsp;NULL&nbsp;for Amount).<\/td><\/tr><tr><td><strong>RIGHT JOIN<\/strong><\/td><td>SELECT p.Amount, s.First_Name FROM&nbsp; Students s RIGHT JOIN&nbsp; Payments p&nbsp; ON s.Student_ID = p.Student_ID;<\/td><td>Retrieves all payments, including those not linked to any students (with&nbsp;NULL&nbsp;for Student details).<\/td><\/tr><tr><td><strong>FULL OUTER JOIN<\/strong><\/td><td>SELECT s.First_Name, p.Amount FROM Students s FULL OUTER JOIN Payments p ON s.Student_ID = p.Student_ID;<\/td><td>Combines&nbsp;LEFT JOIN&nbsp;and&nbsp;RIGHT JOIN, showing unmatched rows from both tables.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong><br><\/strong><\/p>\n\n\n\n<p><strong>6. Data Integrity and Validation<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Check Constraint<\/strong><\/td><td>ALTER TABLE Sessions ADD CONSTRAINT CHK_Duration CHECK (Duration &gt; 0);<\/td><td>Ensures that&nbsp;Duration&nbsp;in the&nbsp;Sessions&nbsp;table is always greater than 0.<\/td><\/tr><tr><td><strong>Unique Constraint<\/strong><\/td><td>ALTER TABLE Students ADD CONSTRAINT UC_Student_Email UNIQUE (Email);<\/td><td>Ensures that student emails are unique.<\/td><\/tr><tr><td><strong>Foreign Key<\/strong><\/td><td>ALTER TABLE Sessions ADD CONSTRAINT FK_Student FOREIGN KEY (Student_ID) REFERENCES Students(Student_ID);<\/td><td>Links the&nbsp;Sessions.Student_ID&nbsp;column to the&nbsp;Students.Student_ID&nbsp;column, enforcing referential integrity.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>7. Analytical and Reporting Queries<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Revenue by Tutor<\/strong><\/td><td>SELECT &nbsp;&nbsp;&nbsp; t.Tutor_ID, &nbsp;&nbsp;&nbsp; t.First_Name || &#8216; &#8216; || t.Last_Name AS Tutor_Name, &nbsp;&nbsp;&nbsp; SUM(s.Cost) AS Total_Revenue FROM &nbsp;&nbsp;&nbsp; Tutors t JOIN &nbsp;&nbsp;&nbsp; Sessions s ON t.Tutor_ID = s.Tutor_ID GROUP BY &nbsp;&nbsp;&nbsp; t.Tutor_ID, t.First_Name, t.Last_Name ORDER BY &nbsp;&nbsp;&nbsp; Total_Revenue DESC; &nbsp;&nbsp;&nbsp;<\/td><td>This query calculates the&nbsp;<strong>total revenue<\/strong>&nbsp;generated by each tutor by summing up the&nbsp;Cost&nbsp;column for all tutoring sessions conducted by that tutor.<\/td><\/tr><tr><td><strong>Top Students<\/strong><\/td><td>SELECT st.First_Name, st.Last_Name, COUNT(s.Session_ID) AS Total_Sessions FROM Students st JOIN Sessions s ON st.Student_ID = s.Student_ID GROUP BY st.First_Name, st.Last_Name ORDER BY Total_Sessions DESC;<\/td><td>Lists students with the most sessions, in descending order.<\/td><\/tr><tr><td><strong>Session Analysis<\/strong><\/td><td>SELECT Tutor_ID, AVG(Cost) AS Avg_Cost, MAX(Cost) AS Max_Cost FROM Sessions GROUP BY Tutor_ID;<\/td><td>Provides average and maximum session costs per tutor.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>8. Additional Features<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Concept<\/strong><\/td><td><strong>Example Code<\/strong><\/td><td><strong>Explanation<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Create View<\/strong><\/td><td>CREATE VIEW Student_Payments AS SELECT s.First_Name, s.Last_Name, p.Amount FROM Students s JOIN Payments p ON s.Student_ID = p.Student_ID;<\/td><td>Creates a reusable view to quickly access student payment data.<\/td><\/tr><tr><td><strong>Index<\/strong><\/td><td>CREATE INDEX idx_sessions_date ON Sessions(Session_Date);<\/td><td>Creates an index on&nbsp;Session_Date&nbsp;to optimize query performance.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Summary<\/strong><\/p>\n\n\n\n<p>This tabulated list demonstrates key SQL concepts with practical examples tailored for the&nbsp;<strong>My Three Sons Tutoring Group LLC<\/strong>&nbsp;database. It covers foundational topics like&nbsp;<strong>DDL<\/strong>,&nbsp;<strong>DML<\/strong>,&nbsp;<strong>aggregations<\/strong>, and advanced SQL features like&nbsp;<strong>joins<\/strong>,&nbsp;<strong>constraints<\/strong>, and&nbsp;<strong>analytical queries<\/strong>, providing a comprehensive toolkit for database management and reporting.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Right Join vs Left Join<\/h1>\n\n\n\n<p>12-18-2024<\/p>\n\n\n\n<p>How do you identify the left table vs the right table in the syntax? In SQL syntax, the <strong>left table<\/strong> and <strong>right table<\/strong> are determined by their <strong>position in the <\/strong><strong>FROM<\/strong><strong> and <\/strong><strong>JOIN<\/strong><strong> clauses<\/strong>. The <strong>table listed first in the <\/strong><strong>FROM<\/strong><strong> clause<\/strong> is always the <strong>left table<\/strong>, and the <strong>table listed after the <\/strong><strong>JOIN<\/strong><strong> keyword<\/strong> is the <strong>right table<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Syntax Overview <\/strong>The general syntax of a join looks like this:<\/p>\n\n\n\n<p>SELECT columns<\/p>\n\n\n\n<p>FROM left_table<\/p>\n\n\n\n<p>&lt;JOIN TYPE&gt; right_table<\/p>\n\n\n\n<p>ON left_table.column = right_table.column;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>left_table<\/strong>: The table listed in the <strong>FROM<\/strong><strong> clause<\/strong> (before the JOIN).<\/li>\n\n\n\n<li><strong>right_table<\/strong>: The table listed in the <strong>JOIN<\/strong><strong> clause<\/strong> (after the JOIN).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Example 1: LEFT JOIN<\/strong><\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.Student_ID,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Amount<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s &#8212; LEFT TABLE<\/p>\n\n\n\n<p>LEFT JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments p &#8212; RIGHT TABLE<\/p>\n\n\n\n<p>ON<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.Student_ID = p.Student_ID;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Left Table<\/strong>: Students (appears in the FROM clause).<\/li>\n\n\n\n<li><strong>Right Table<\/strong>: Payments (appears after the LEFT JOIN).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Example 2: RIGHT JOIN<\/strong><\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Payment_ID,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Amount,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s &#8212; LEFT TABLE<\/p>\n\n\n\n<p>RIGHT JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments p &#8212; RIGHT TABLE<\/p>\n\n\n\n<p>ON<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.Student_ID = p.Student_ID;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Left Table<\/strong>: Students (appears in the FROM clause).<\/li>\n\n\n\n<li><strong>Right Table<\/strong>: Payments (appears after the RIGHT JOIN).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>How to Identify the Left and Right Tables<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Position<\/strong><\/td><td><strong>Left Table<\/strong><\/td><td><strong>Right Table<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>FROM<\/strong><strong> Clause<\/strong><\/td><td>The first table mentioned.<\/td><td>Not applicable.<\/td><\/tr><tr><td><strong>After the JOIN Keyword<\/strong><\/td><td>Not applicable.<\/td><td>The second table mentioned.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Example Comparison: LEFT vs. RIGHT JOIN<\/strong><\/p>\n\n\n\n<p><strong>Using <\/strong><strong>LEFT JOIN<\/strong><strong>:<\/strong><\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.Student_ID,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Amount<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s &#8212; LEFT TABLE<\/p>\n\n\n\n<p>LEFT JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments p &#8212; RIGHT TABLE<\/p>\n\n\n\n<p>ON<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.Student_ID = p.Student_ID;<\/p>\n\n\n\n<p><strong>Using <\/strong><strong>RIGHT JOIN<\/strong><strong>:<\/strong><\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Payment_ID,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Amount,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s &#8212; LEFT TABLE<\/p>\n\n\n\n<p>RIGHT JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments p &#8212; RIGHT TABLE<\/p>\n\n\n\n<p>ON<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.Student_ID = p.Student_ID;<\/p>\n\n\n\n<p>In <strong>both examples<\/strong>, the <strong>left table<\/strong> remains the one in the FROM clause (Students), and the <strong>right table<\/strong> remains the one after the JOIN keyword (Payments).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Visualizing LEFT vs. RIGHT<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In a <strong>LEFT JOIN<\/strong>, you include all rows from the left table (the one in the FROM clause), regardless of matches.<\/li>\n\n\n\n<li>In a <strong>RIGHT JOIN<\/strong>, you include all rows from the right table (the one after the JOIN keyword), regardless of matches.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong><br><\/strong><\/p>\n\n\n\n<p><strong>Example Results<\/strong><\/p>\n\n\n\n<p><strong>LEFT JOIN Results (All Students, Payments if available)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Student_ID<\/strong><\/td><td><strong>First_Name<\/strong><\/td><td><strong>Amount<\/strong><\/td><\/tr><\/thead><tbody><tr><td>1<\/td><td>Sarah<\/td><td>100<\/td><\/tr><tr><td>2<\/td><td>Michael<\/td><td>67.5<\/td><\/tr><tr><td>3<\/td><td>Emily<\/td><td>100<\/td><\/tr><tr><td>4<\/td><td>Rachel<\/td><td>NULL<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>RIGHT JOIN Results (All Payments, Students if available)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Payment_ID<\/strong><\/td><td><strong>Amount<\/strong><\/td><td><strong>First_Name<\/strong><\/td><\/tr><\/thead><tbody><tr><td>1<\/td><td>100<\/td><td>Sarah<\/td><\/tr><tr><td>2<\/td><td>67.5<\/td><td>Michael<\/td><\/tr><tr><td>3<\/td><td>100<\/td><td>Emily<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Key Takeaways<\/strong><\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Left Table<\/strong>: The table mentioned in the FROM clause.<\/li>\n\n\n\n<li><strong>Right Table<\/strong>: The table mentioned after the JOIN keyword.<\/li>\n\n\n\n<li><strong>Direction<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>LEFT JOIN<\/strong>: Includes all rows from the left table, even if no match exists in the right table.<\/li>\n\n\n\n<li><strong>RIGHT JOIN<\/strong>: Includes all rows from the right table, even if no match exists in the left table.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>By reading the SQL syntax, you can always determine which table is the <strong>left<\/strong> and which is the <strong>right<\/strong> based on their positions relative to the FROM and JOIN clauses!<strong><br><\/strong><\/p>\n\n\n\n<p><strong>REVIEW: LEFT JOIN<\/strong> and <strong>RIGHT JOIN<\/strong> are used to retrieve data from two related tables, but they differ in which table&#8217;s rows are prioritized when there is no match between the tables. Here\u2019s how to <strong>distinguish LEFT JOIN from RIGHT JOIN<\/strong>, using <strong>examples<\/strong> with sample tables from the <strong>My Three Sons Tutoring Group LLC<\/strong> schema.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>What is a LEFT JOIN?<\/strong><\/p>\n\n\n\n<p>A <strong>LEFT JOIN<\/strong> retrieves:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All rows from the <strong>left table<\/strong>, regardless of whether there is a match in the right table.<\/li>\n\n\n\n<li>If there\u2019s no match in the right table, the columns from the right table will contain NULL.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>What is a RIGHT JOIN?<\/strong><\/p>\n\n\n\n<p>A <strong>RIGHT JOIN<\/strong> retrieves:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All rows from the <strong>right table<\/strong>, regardless of whether there is a match in the left table.<\/li>\n\n\n\n<li>If there\u2019s no match in the left table, the columns from the left table will contain NULL.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Sample Tables<\/strong><\/p>\n\n\n\n<p><strong>Students Table (Left Table)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Student_ID<\/strong><\/td><td><strong>First_Name<\/strong><\/td><td><strong>Last_Name<\/strong><\/td><\/tr><\/thead><tbody><tr><td>1<\/td><td>Sarah<\/td><td>Johnson<\/td><\/tr><tr><td>2<\/td><td>Michael<\/td><td>Lee<\/td><\/tr><tr><td>3<\/td><td>Emily<\/td><td>Davis<\/td><\/tr><tr><td>4<\/td><td>Rachel<\/td><td>Brown<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Payments Table (Right Table)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Payment_ID<\/strong><\/td><td><strong>Student_ID<\/strong><\/td><td><strong>Amount<\/strong><\/td><\/tr><\/thead><tbody><tr><td>1<\/td><td>1<\/td><td>100<\/td><\/tr><tr><td>2<\/td><td>2<\/td><td>67.5<\/td><\/tr><tr><td>3<\/td><td>3<\/td><td>100<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong><br><\/strong><\/p>\n\n\n\n<p><strong>1. LEFT JOIN Example<\/strong><\/p>\n\n\n\n<p>Retrieve all students, including those who have <strong>not made any payments<\/strong>.<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.Student_ID,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name || &#8216; &#8216; || s.Last_Name AS Student_Name,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Amount<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s<\/p>\n\n\n\n<p>LEFT JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments p ON s.Student_ID = p.Student_ID;<\/p>\n\n\n\n<p><strong>Explanation<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>Students<\/strong> table is the left table, so all students are included.<\/li>\n\n\n\n<li>If there\u2019s no matching row in the <strong>Payments<\/strong> table, NULL is returned for the Amount.<\/li>\n<\/ul>\n\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Student_ID<\/strong><\/td><td><strong>Student_Name<\/strong><\/td><td><strong>Amount<\/strong><\/td><\/tr><\/thead><tbody><tr><td>1<\/td><td>Sarah Johnson<\/td><td>100<\/td><\/tr><tr><td>2<\/td><td>Michael Lee<\/td><td>67.5<\/td><\/tr><tr><td>3<\/td><td>Emily Davis<\/td><td>100<\/td><\/tr><tr><td>4<\/td><td>Rachel Brown<\/td><td>NULL<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Key Takeaway<\/strong>: The unmatched student (Rachel Brown) appears, but their Amount is NULL because no corresponding payment exists.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>2. RIGHT JOIN Example<\/strong><\/p>\n\n\n\n<p>Retrieve all payments, including those where <strong>students are not listed<\/strong> in the Students table (e.g., invalid Student_ID in Payments).<\/p>\n\n\n\n<p><strong>SQL Query<\/strong>:<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Payment_ID,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Amount,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name || &#8216; &#8216; || s.Last_Name AS Student_Name<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s<\/p>\n\n\n\n<p>RIGHT JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments p ON s.Student_ID = p.Student_ID;<\/p>\n\n\n\n<p><strong>Explanation<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>Payments<\/strong> table is the right table, so all payments are included.<\/li>\n\n\n\n<li>If there\u2019s no matching row in the <strong>Students<\/strong> table, NULL is returned for the student information.<\/li>\n<\/ul>\n\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Payment_ID<\/strong><\/td><td><strong>Amount<\/strong><\/td><td><strong>Student_Name<\/strong><\/td><\/tr><\/thead><tbody><tr><td>1<\/td><td>100<\/td><td>Sarah Johnson<\/td><\/tr><tr><td>2<\/td><td>67.5<\/td><td>Michael Lee<\/td><\/tr><tr><td>3<\/td><td>100<\/td><td>Emily Davis<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Key Takeaway<\/strong>: All payments are included, even if no valid student exists in the Students table.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Key Difference Illustrated<\/strong><\/p>\n\n\n\n<p><strong>When Data Doesn&#8217;t Match<\/strong><\/p>\n\n\n\n<p>Let\u2019s assume there\u2019s a payment with Student_ID = 5 in the <strong>Payments<\/strong> table, but no corresponding student in the <strong>Students<\/strong> table:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>LEFT JOIN<\/strong>: The unmatched payment won\u2019t appear because we are prioritizing the <strong>Students<\/strong> table.<\/li>\n<\/ul>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.Student_ID,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name || &#8216; &#8216; || s.Last_Name AS Student_Name,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Amount<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s<\/p>\n\n\n\n<p>LEFT JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments p ON s.Student_ID = p.Student_ID;<\/p>\n\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Student_ID<\/strong><\/td><td><strong>Student_Name<\/strong><\/td><td><strong>Amount<\/strong><\/td><\/tr><\/thead><tbody><tr><td>1<\/td><td>Sarah Johnson<\/td><td>100<\/td><\/tr><tr><td>2<\/td><td>Michael Lee<\/td><td>67.5<\/td><\/tr><tr><td>3<\/td><td>Emily Davis<\/td><td>100<\/td><\/tr><tr><td>4<\/td><td>Rachel Brown<\/td><td>NULL<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>RIGHT JOIN<\/strong>: The unmatched payment will appear because we are prioritizing the <strong>Payments<\/strong> table.<\/li>\n<\/ul>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Payment_ID,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; p.Amount,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name || &#8216; &#8216; || s.Last_Name AS Student_Name<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s<\/p>\n\n\n\n<p>RIGHT JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments p ON s.Student_ID = p.Student_ID;<strong><br><\/strong><\/p>\n\n\n\n<p><strong>Result<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Payment_ID<\/strong><\/td><td><strong>Amount<\/strong><\/td><td><strong>Student_Name<\/strong><\/td><\/tr><\/thead><tbody><tr><td>1<\/td><td>100<\/td><td>Sarah Johnson<\/td><\/tr><tr><td>2<\/td><td>67.5<\/td><td>Michael Lee<\/td><\/tr><tr><td>3<\/td><td>100<\/td><td>Emily Davis<\/td><\/tr><tr><td>4<\/td><td>200<\/td><td>NULL<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Summary of Differences:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Aspect<\/strong><\/td><td><strong>LEFT JOIN<\/strong><\/td><td><strong>RIGHT JOIN<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Row Priority<\/strong><\/td><td>All rows from the <strong>left table<\/strong> are included.<\/td><td>All rows from the <strong>right table<\/strong> are included.<\/td><\/tr><tr><td><strong>Unmatched Rows<\/strong><\/td><td>Unmatched rows from the <strong>left table<\/strong> have NULL values in the right table&#8217;s columns.<\/td><td>Unmatched rows from the <strong>right table<\/strong> have NULL values in the left table&#8217;s columns.<\/td><\/tr><tr><td><strong>Use Case Example<\/strong><\/td><td>Retrieve all students, even if they haven\u2019t made payments.<\/td><td>Retrieve all payments, even if they aren\u2019t linked to students.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>By understanding these differences, you can choose the appropriate join based on the priority of your business data. <strong><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">More SQL to decipher and modify<\/h1>\n\n\n\n<p>12-18-2024<\/p>\n\n\n\n<p><strong>1. Calculate Total Revenue Earned by Each Tutor<\/strong><\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; t.First_Name || &#8216; &#8216; || t.Last_Name AS Tutor_Name,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; SUM(s.Cost) AS Total_Revenue<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Tutors t<\/p>\n\n\n\n<p>JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Sessions s ON t.Tutor_ID = s.Tutor_ID<\/p>\n\n\n\n<p>GROUP BY<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; t.First_Name, t.Last_Name;<\/p>\n\n\n\n<p>Output:<\/p>\n\n\n\n<p>Tutor_Name&nbsp;&nbsp;&nbsp;&nbsp; Total_Revenue<\/p>\n\n\n\n<p>John Smith&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200<\/p>\n\n\n\n<p>Amanda Brown&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 67.5<\/p>\n\n\n\n<p><strong>2. Find Students with Outstanding Feedback (Rating &lt; 5)<\/strong><\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; s.First_Name || &#8216; &#8216; || s.Last_Name AS Student_Name,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; f.Rating,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; f.Comments<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Feedback f<\/p>\n\n\n\n<p>JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Sessions sess ON f.Session_ID = sess.Session_ID<\/p>\n\n\n\n<p>JOIN<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Students s ON sess.Student_ID = s.Student_ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>WHERE<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; f.Rating &lt; 5;<\/p>\n\n\n\n<p>Output:<\/p>\n\n\n\n<p>Student_Name Rating&nbsp; Comments<\/p>\n\n\n\n<p>Michael Lee&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Good session, needs examples<\/p>\n\n\n\n<p><strong>3. List Payments by Payment Method<\/strong><\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payment_Method,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; SUM(Amount) AS Total_Amount<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payments<\/p>\n\n\n\n<p>GROUP BY<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp; Payment_Method;<\/p>\n\n\n\n<p>Output:<\/p>\n\n\n\n<p>Payment_Method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total_Amount<\/p>\n\n\n\n<p>Credit Card&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200<\/p>\n\n\n\n<p>Cash&nbsp;&nbsp;&nbsp;&nbsp; 67.5<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">INTRODUCTION TO ORACLE SQL DEV WEB:&nbsp; DATA QUERIES AND DATABASE MANAGEMENT<\/h2>\n\n\n\n<p>Fall 2024 \/ September 2024<\/p>\n\n\n\n<p>Prerequisites: proficient with a web browser and basic Microsoft Excel experience or equivalent<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LAB COMPUTER SIGN IN <\/h2>\n\n\n\n<p>Use your NCC ID. It starts with N00&#8230;.  The password is your date of birth in this six-digit format:  MMDDYY.<\/p>\n\n\n\n<p>Username with capital N<\/p>\n\n\n\n<p>       N00______<\/p>\n\n\n\n<p>The password your birthday as six digits:<\/p>\n\n\n\n<p>        MMDDYY<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Workshop Description:&nbsp; Embark on a transformative hands-on workshop into data with an Oracle SQL Developer specialist. In just three hours, master Oracle SQL Developer Web&#8217;s interface, run potent queries, and export data effortlessly. This session lays the groundwork for success when refining database management. Join us and harness the power of data-driven decision-making.<\/p>\n\n\n\n<p><strong>What are the differences between Oracle SQL Developer and MS Access?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Feature<\/strong><\/td><td><strong>Oracle SQL Developer<\/strong><\/td><td><strong>MS Access<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>Purpose<\/strong><\/td><td>Oracle SQL Developer is a tool designed for managing and querying Oracle databases. It provides features to handle complex queries, PL\/SQL development, and large-scale database management.<\/td><td>MS Access is a desktop-based relational database system ideal for small to medium-sized applications and users who need to build simple databases with basic queries and reports.<\/td><\/tr><tr><td><strong>Scalability<\/strong><\/td><td>Oracle SQL Developer handles large enterprise-level databases with millions of records and complex queries. It is ideal for robust, distributed environments.<\/td><td>MS Access is more suitable for small databases and personal use, with limits on the number of records and concurrent users.<\/td><\/tr><tr><td><strong>Multi-user Support<\/strong><\/td><td>Supports thousands of users simultaneously, with strong concurrency control and user management features.<\/td><td>Limited to a small number of concurrent users (around 10-20 depending on usage), with scalability issues in multi-user environments.<\/td><\/tr><tr><td><strong>Query Language<\/strong><\/td><td>Uses PL\/SQL (Procedural Language for SQL) for more advanced database logic, which is more powerful than standard SQL alone.<\/td><td>Uses standard SQL with basic querying capabilities, and offers VBA for scripting tasks but lacks complex functionality.<\/td><\/tr><tr><td><strong>Interface<\/strong><\/td><td>Oracle SQL Developer has a web-based interface (SQL Developer Web) and a desktop version, providing extensive database management tools, including RESTful services, data modeling, and performance analysis.<\/td><td>MS Access is desktop-based with a user-friendly interface that focuses on building simple queries, forms, and reports, targeting non-technical users.<\/td><\/tr><tr><td><strong>Export\/Import<\/strong><\/td><td>Extensive export options (CSV, Excel, XML, JSON), plus direct database links for data integration.<\/td><td>Export options are more limited, typically supporting CSV, Excel, and text files, with some support for ODBC connections.<\/td><\/tr><tr><td><strong>Strengths<\/strong><\/td><td>Highly scalable, supports advanced database logic, enterprise-grade security, and handles complex database systems efficiently.<\/td><td>Easy to use for beginners, especially for small-scale applications, with built-in GUI tools for designing tables and queries.<\/td><\/tr><tr><td><strong>Weaknesses<\/strong><\/td><td>More complex to learn for beginners, requires some knowledge of PL\/SQL and Oracle database administration.<\/td><td>Not suitable for large-scale databases or multi-user environments; limited functionality for advanced users.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>The hands-on workshop empowers participants to run SELECT queries.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Key points found in Oracle but not in MS Access<\/h2>\n\n\n\n<p>&#8212; supported browsers as of Sept 2024<\/p>\n\n\n\n<p>Supported Browsers<br>Oracle Cloud Infrastructure supports the following browsers and versions:<\/p>\n\n\n\n<p>Google Chrome 80 or later<br>Safari 12.1 or later<br>Firefox 62 or later (Private Browsing mode isn&#8217;t supported)*<br>Edge 104 or later<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Creation of Database:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"187\" src=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-1.png?resize=975%2C187&#038;ssl=1\" alt=\"\" class=\"wp-image-3003\" srcset=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-1.png?w=975&amp;ssl=1 975w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-1.png?resize=300%2C58&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-1.png?resize=768%2C147&amp;ssl=1 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>&#8211;show users:<\/p>\n\n\n\n<p>SELECT * FROM dba_users;<\/p>\n\n\n\n<p>&#8211;create user using SQL:<\/p>\n\n\n\n<p>SAMPLE<\/p>\n\n\n\n<p>\/&#8211; USER SQL<br>CREATE USER STUDENT11 IDENTIFIED BY EasyExcelLearning123;<\/p>\n\n\n\n<p>&#8212; ADD ROLES<br>GRANT CONNECT TO STUDENT11;GRANT RESOURCE TO STUDENT11;<\/p>\n\n\n\n<p>&#8212; REST ENABLE<br>BEGIN<br>ORDS_ADMIN.ENABLE_SCHEMA(<br>p_enabled =&gt; TRUE,<br>p_schema =&gt; &#8216;STUDENT11&#8217;,<br>p_url_mapping_type =&gt; &#8216;BASE_PATH&#8217;,<br>p_url_mapping_pattern =&gt; &#8216;student11&#8217;,<br>p_auto_rest_auth=&gt; TRUE<br>);<br>&#8212; ENABLE DATA SHARING<br>C##ADP$SERVICE.DBMS_SHARE.ENABLE_SCHEMA(<br>SCHEMA_NAME =&gt; &#8216;STUDENT11&#8217;,<br>ENABLED =&gt; TRUE<br>);<br>commit;<br>END;<br>\/<\/p>\n\n\n\n<p>STUDENT VIEW<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"446\" src=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-2.png?resize=1024%2C446&#038;ssl=1\" alt=\"\" class=\"wp-image-3006\" srcset=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-2.png?resize=1024%2C446&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-2.png?resize=300%2C131&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-2.png?resize=768%2C334&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-2.png?resize=1536%2C669&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-2.png?w=1868&amp;ssl=1 1868w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n\n\n\n<p>ADMIN uploads file<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-3.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"488\" src=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-3.png?resize=1024%2C488&#038;ssl=1\" alt=\"\" class=\"wp-image-3008\" srcset=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-3.png?resize=1024%2C488&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-3.png?resize=300%2C143&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-3.png?resize=768%2C366&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-3.png?resize=1536%2C731&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-3.png?w=1913&amp;ssl=1 1913w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>UPLOADED BBQLIST from Excel File<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-4.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"653\" src=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-4.png?resize=1024%2C653&#038;ssl=1\" alt=\"\" class=\"wp-image-3009\" srcset=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-4.png?resize=1024%2C653&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-4.png?resize=300%2C191&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-4.png?resize=768%2C489&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-4.png?w=1169&amp;ssl=1 1169w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>RESULTS of SELECT QUERY<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-5.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"704\" src=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-5.png?resize=1024%2C704&#038;ssl=1\" alt=\"\" class=\"wp-image-3010\" srcset=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-5.png?resize=1024%2C704&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-5.png?resize=300%2C206&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-5.png?resize=768%2C528&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-5.png?w=1240&amp;ssl=1 1240w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>SHOW all columns using &#8220;*&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-6.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"704\" src=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-6.png?resize=1024%2C704&#038;ssl=1\" alt=\"\" class=\"wp-image-3012\" srcset=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-6.png?resize=1024%2C704&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-6.png?resize=300%2C206&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-6.png?resize=768%2C528&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image-6.png?w=1170&amp;ssl=1 1170w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n\n\n\n<p>drag and drop of table to generate SELECT code<\/p>\n\n\n\n<p>SELECT<br>TRAFFIC_LIGHT,<br>ACTION<br>FROM<\/p>\n\n\n\n<p>how to rename a table<br>RENAME TABLE table-Name TO new-Table-Name<\/p>\n\n\n\n<p>Table:<br>ADMIN.ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE;<\/p>\n\n\n\n<p>RENAME TABLE ADMIN.ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE TO ADMIN.SmallTable<\/p>\n\n\n\n<p>RENAME ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE TO SMALLTABLE;<\/p>\n\n\n\n<p>How do I check all userss and their roles on Oracle SQL Developer WEB?<br>How to show all privileges from a user in oracle?<\/p>\n\n\n\n<p>Create users which only have SELECT or READ privileges on the desired tables<\/p>\n\n\n\n<p>Grant select on schema.table to userX;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>GRANT select to STUDENT account:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>To check level of access, as of Oracle 11g.<\/p>\n\n\n\n<p>Replace USER with the desired username<\/p>\n\n\n\n<p>Granted Roles:<\/p>\n\n\n\n<p>SELECT *<br>FROM DBA_ROLE_PRIVS<br>WHERE GRANTEE = &#8216;USER&#8217;;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br>Privileges Granted Directly To User:<\/p>\n\n\n\n<p>SELECT *<br>FROM DBA_TAB_PRIVS<br>WHERE GRANTEE = &#8216;USER&#8217;;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br>Privileges Granted to Role Granted to User:<\/p>\n\n\n\n<p>SELECT *<br>FROM DBA_TAB_PRIVS<br>WHERE GRANTEE IN (SELECT granted_role<br>FROM DBA_ROLE_PRIVS<br>WHERE GRANTEE = &#8216;USER&#8217;);<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br>Granted System Privileges:<\/p>\n\n\n\n<p>SELECT *<br>FROM DBA_SYS_PRIVS<br>WHERE GRANTEE = &#8216;USER&#8217;;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"799\" height=\"704\" src=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image.png?resize=799%2C704&#038;ssl=1\" alt=\"\" class=\"wp-image-3001\" srcset=\"https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image.png?w=799&amp;ssl=1 799w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image.png?resize=300%2C264&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.nytechnologist.com\/beyondthebasics\/wp-content\/uploads\/2024\/09\/image.png?resize=768%2C677&amp;ssl=1 768w\" sizes=\"auto, (max-width: 799px) 100vw, 799px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">For Hands ON activity Sign in<\/h1>\n\n\n\n<p>&nbsp;Instructor will provide a link and password for account:<\/p>\n\n\n\n<p>Student01<\/p>\n\n\n\n<p>Student02<\/p>\n\n\n\n<p>Student03<\/p>\n\n\n\n<p>Student04<\/p>\n\n\n\n<p>Student05<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Checklist<\/h1>\n\n\n\n<p><strong>Lesson Plan: Introduction to Oracle SQL Developer Web: Data Queries and Database Management<\/strong><\/p>\n\n\n\n<p><strong>Prerequisites:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Proficient with web browsers<\/li>\n\n\n\n<li>Basic experience with Microsoft Excel or equivalent<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Lesson Plan Overview <\/strong><\/p>\n\n\n\n<p><strong>Objective:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>By the end of this session, participants will be able to navigate Oracle SQL Developer Web, execute SQL queries, and export data in multiple formats.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Session Breakdown<\/strong><\/p>\n\n\n\n<p><strong>Introduction &amp; Objectives <\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Introduction to Oracle SQL Developer Web<\/li>\n\n\n\n<li>Overview of workshop goals\n<ul class=\"wp-block-list\">\n<li>Interface navigation<\/li>\n\n\n\n<li>Running SQL queries and scripts<\/li>\n\n\n\n<li>Exporting data in various formats<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Practical application of data-driven decision-making<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Module 1: Getting Started with Oracle SQL Developer Web <\/strong><\/p>\n\n\n\n<p><strong>Topics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Logging in to Oracle SQL Developer Web<\/li>\n\n\n\n<li>Exploring the Dashboard and interface components\n<ul class=\"wp-block-list\">\n<li>Navigation Menu (SQL, RESTful services, Data Modeler)<\/li>\n\n\n\n<li>SQL worksheet<\/li>\n\n\n\n<li>Schema browser<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>Hands-on Activity:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Walkthrough of navigating the interface<\/li>\n\n\n\n<li>Opening the worksheet for query execution<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Module 2: Running SQL Queries and Scripts <\/strong><\/p>\n\n\n\n<p><strong>Topics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Writing basic SQL SELECT statements<\/li>\n\n\n\n<li>Executing scripts to manage and manipulate data<\/li>\n<\/ul>\n\n\n\n<p><strong>Hands-on Activity:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Write and execute a simple SELECT query to retrieve data from an example table (e.g., EMPLOYEES):<\/li>\n<\/ul>\n\n\n\n<p>sql<\/p>\n\n\n\n<p>Copy code<\/p>\n\n\n\n<p>SELECT employee_id, first_name, last_name, department_id<\/p>\n\n\n\n<p>FROM employees<\/p>\n\n\n\n<p>WHERE department_id = 10;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Module 3: Advanced Query Techniques <\/strong><\/p>\n\n\n\n<p><strong>Topics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Aggregation functions: SUM, COUNT, AVG, MAX, MIN<\/li>\n\n\n\n<li>Grouping and filtering data using GROUP BY and HAVING<\/li>\n<\/ul>\n\n\n\n<p><strong>Hands-on Activity:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Example: Joining employees and departments tables to retrieve department names:<\/li>\n<\/ul>\n\n\n\n<p>SELECT department_id, COUNT(employee_id) AS total_employees<\/p>\n\n\n\n<p>FROM employees<\/p>\n\n\n\n<p>GROUP BY department_id<\/p>\n\n\n\n<p>HAVING COUNT(employee_id) &gt; 5;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Module 4: Exporting Data <\/strong><\/p>\n\n\n\n<p><strong>Topics:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Exporting query results to CSV, Excel, and JSON formats<\/li>\n\n\n\n<li>Configuring export options and managing file formats<\/li>\n<\/ul>\n\n\n\n<p><strong>Hands-on Activity:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Example of exporting employee data to CSV:\n<ul class=\"wp-block-list\">\n<li>Run query:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>sql<\/p>\n\n\n\n<p>Copy code<\/p>\n\n\n\n<p>SELECT employee_id, first_name, last_name, department_id<\/p>\n\n\n\n<p>FROM employees;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Export the result to a CSV file:\n<ul class=\"wp-block-list\">\n<li>Navigate to &#8220;Export&#8221; in the worksheet<\/li>\n\n\n\n<li>Select format (CSV, XLS, etc.)<\/li>\n\n\n\n<li>Save the file<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Conclusion &amp; Q&amp;A <\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Recap of key concepts<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Examples<\/strong><\/p>\n\n\n\n<p><strong>1. Navigating Oracle SQL Developer Web<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Login<\/strong>: Open Oracle SQL Developer Web via a web browser, log in with credentials.<\/li>\n\n\n\n<li><strong>Navigate<\/strong>: Use the left navigation menu to access different features (SQL, Data Models).<\/li>\n\n\n\n<li><strong>Worksheet<\/strong>: Open the worksheet from the toolbar to begin writing queries.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>2. Running SQL Statements and Scripts<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Basic Query<\/strong>: Retrieve employee names from the EMPLOYEES table:<\/li>\n<\/ul>\n\n\n\n<p>sql<\/p>\n\n\n\n<p>Copy code<\/p>\n\n\n\n<p>SELECT first_name, last_name FROM employees;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>3. Export Data<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After running a query, export the result set by clicking the &#8220;Export&#8221; button.<\/li>\n\n\n\n<li>Choose the export format: CSV, XLS, or JSON.<\/li>\n\n\n\n<li>Save the exported data to your system for further use.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Work with the BBQ list Table<\/h1>\n\n\n\n<p>Select queries enable you to select all or specific columns<\/p>\n\n\n\n<p>Example, show all columns of table bbq<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>bbq.*<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>ADMIN.ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE_1 bbq;<\/p>\n\n\n\n<p>Shortcut:&nbsp; CTL with ENTER enables you to run a query.<\/p>\n\n\n\n<p>Example: Show specific columns<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>bbq.DESCRIPTION,<\/p>\n\n\n\n<p>bbq.CATEGORY,<\/p>\n\n\n\n<p>bbq.QUANTITY,<\/p>\n\n\n\n<p>bbq.UNIT_PRICE<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>ADMIN.ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE_1 bbq;<\/p>\n\n\n\n<p>Example: Multiply two columns to calculate a CALC_subtotal<\/p>\n\n\n\n<p>SELECT<\/p>\n\n\n\n<p>bbq.DESCRIPTION,<\/p>\n\n\n\n<p>bbq.CATEGORY,<\/p>\n\n\n\n<p>bbq.QUANTITY,<\/p>\n\n\n\n<p>bbq.UNIT_PRICE<\/p>\n\n\n\n<p>bbq.QUANTITY * bbq.UNIT_PRICE CalculatedSubtotal<\/p>\n\n\n\n<p>FROM<\/p>\n\n\n\n<p>ADMIN.ADVANCED_EXCEL_BELLMORE_MERRICK_GLEN_COVE_1 bbq;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student01\/_sdw\">https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student01\/_sdw<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student02\/_sdw\">https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student02\/_sdw<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student03\/_sdw\">https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student03\/_sdw<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student04\/_sdw\">https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student04\/_sdw<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student05\/_sdw\">https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student05\/_sdw<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student06\/_sdw\">https:\/\/gbbc386fafe6ff5-oraclesandbox.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student06\/_sdw<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Small Business Accounting STUDENT01 https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student01\/_sdw STUDENT02 https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student02\/_sdw STUDENT03 https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student03\/_sdw STUDENT04 https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student04\/_sdw STUDENT05 https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student05\/_sdw STUDENT06 https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student06\/_sdw STUDENT07 https:\/\/gbbc386fafe6ff5-muxzj7ay8uvq4qg3.adb.us-ashburn-1.oraclecloudapps.com\/ords\/student07\/_sdw Intermediate Oracle SQL Workshop Saturday 6-7-2025 Modify the Essential Oracle SQL Developer Web code examples below from 12-18-2024 Provide the required privileges to the tables.&nbsp; For example: Below is an&nbsp;organized, tabulated list&nbsp;of essential SQL code examples using the&nbsp;My [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-2415","page","type-page","status-publish","hentry"],"jetpack_shortlink":"https:\/\/wp.me\/P2Cll0-CX","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-json\/wp\/v2\/pages\/2415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-json\/wp\/v2\/comments?post=2415"}],"version-history":[{"count":63,"href":"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-json\/wp\/v2\/pages\/2415\/revisions"}],"predecessor-version":[{"id":3437,"href":"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-json\/wp\/v2\/pages\/2415\/revisions\/3437"}],"wp:attachment":[{"href":"https:\/\/www.nytechnologist.com\/beyondthebasics\/wp-json\/wp\/v2\/media?parent=2415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}