Answer to Question #200402 in Databases | SQL | Oracle | MS Access for M RAMUHULU

Question #200402

Write SQL code that creates or update a view named same_orders_vw, which will also create columns before it extract data from the database. The view must store details of customers who have ordered the same books as the one in order number 1007. The data to be stored in the view must contain customer no, customer names, book title, address and city as single and quantity. Sort the output in ascending order of customer no. 


1
Expert's answer
2021-05-30T07:10:41-0400
CREATE
    ALGORITHM = UNDEFINED
    DEFINER = `root`@`localhost`
    SQL SECURITY DEFINER
VIEW `ecommerce`.`same_orders_vw` AS
    SELECT
        `ecommerce`.`products`.`name` AS `ProductName`,
        `ecommerce`.`products`.`brand` AS `brand`,
        `ecommerce`.`sales`.`sales_description` AS `sales_description`,
        `ecommerce`.`sales`.`customer_feedback` AS `customer_feedback`
    FROM
                `ecommerce`.`products`
    WHERE `ecommerce`.`products_id=107`;

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