Question
1.Write a pl/SQL block that selects all the rows from the A2order table and prints them to screen. THIS CAN BE EASILY DONE USING AGGREGATE
1.Write a pl/SQL block that selects all the rows from the A2order table and prints them to screen. THIS CAN BE EASILY DONE USING AGGREGATE FUNCTIONS, BUT YOU MUST NOT USE AGGREGATE FUNCTIONS IN THIS ASSIGNMENT 2.
2.Write a pl/sql block that deletes the orders from the A2order table that were ordered after the order that has the highest order_price (Order_date will tell you when a row was entered). YOU MUST USE BULK OPERATIONS FOR THIS CODE
3. Write a pl/sql block that will select orders from A2order table based on the following condition The price of the order is higher than the order that was immediately made before this order and lower than the order that was immediately made after the order.
Then Insert the selected row to A2Myorder Table Below is the creation scripts for the tables
CREATE TABLE A2order
(Order_ID VARCHAR2(12)
PRIMARY KEY,
Order_Date DATE,
Order_Price NUMBER(5,2),
Order_category VARCHAR2(12));
CREATE TABLE A2myorder
(OrderID NUMBER PRIMARY KEY,
Order_Date DATE, Order_Price NUMBER(5,2).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started