Answer to Question #250390 in Databases | SQL | Oracle | MS Access for rosebud21

Question #250390

PRACTICAL: Question 4 (Marks: 10)

Create a PL/SQL query to display the customer’s name and the pet that was purchased. In your solution only display the pet sale quantity greater than 1.

Sample Output

---------------------------------------------------

CUSTOMER NAME: Barry Goodwin

PET TYPE: Dog - Jack Russel

SALE QUANTITY 2

---------------------------------------------------

CUSTOMER NAME: Steven Hewson

PET TYPE: Bird - Budgie

SALE QUANTITY 3

--------------------------------------------------- 


1
Expert's answer
2021-10-13T03:50:44-0400
create table sale(customerName varchar(40) not NULL, petType varchar(50) not null,saleQuantity int not null );
INSERT INTO public.sale(customername, pettype, salequantity)VALUES ('Barry Goodwin', 'Dog - Jack Russel', 2);
INSERT INTO public.sale(customername, pettype, salequantity)VALUES ('Steven Hewson', 'Bird - Budgie', 3);
select * from sale where salequantity>1;

Output:


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS