Question: I am using SQL. For number Q4, this is the row that was added: INSERT INTO categories (category_name) VALUES (Brass); Q.4) (20 points) Write a

 I am using SQL. For number Q4, this is the row

I am using SQL. For number Q4, this is the row that was added:

INSERT INTO categories (category_name) VALUES ("Brass");

Q.4) (20 points) Write a DELETE statement that deletes the row that you added to the Categories table in Question 1 above. When you execute this statement, it will produce an error since the category has related rows in the Products table. To fix that, precede the DELETE statement with another DELETE statement that deletes all products in this category. (Remember that to code two or more statements in a script, you must end each statement with a semicolon.) Q.5) (20 points) Write a SELECT statement that returns one row for each customer that has orders with these columns: The email address from the Customers table A count of the number of orders for the given customer The total amount for each order Filter and return only those rows where the customer has more than 1 order Sort the result set in descending sequence by the sum of the line item amounts

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!