1. BrewBean wants to know the total sold amount for a specific…

Question Answered step-by-step 1. BrewBean wants to know the total sold amount for a specific… 1.  BrewBean wants to know the total sold amount for a specific product within a particular year. Create a function to meet the requirement. Include exception handler.Write a SQL statement to test your function.2.  Allow customers to cancel their order is one of essential functionalities for BrewBean’s site. You are asked to write a trigger that automatically updates the stock level of all products associated with a cancelled order, and update the ORDERPLACED column of the BB_BASKET table to 0 to reflect the order was not completed. The trigger needs to take following into consideration:a. The trigger needs to be fired when a new status record is added to BB_BASKETSTATUS table, and when the IDSTAGE column is set to 4, which indicates an order has been cancelledb. Each basket can contain multiple items in the BB_BASKETITEM tablec. Please keep in mind that coffee can be ordered in half or whole pound You also need to write SQL statement or/and PL/SQL code to demonstrate that implemented trigger accomplishes the business logic 3. Use Mongo shell commands to answer following questionsa. In the sample_training.trips collection, a person with birth year 1961 took a trip that started at “Howard St & Centre St”. What was the end station name for that trip?b. In the sample_training.zips collection, list all cities that have more than 100,000 populations (the field name is pop)c. … Computer Science Engineering & Technology MYSQL Share QuestionEmailCopy link Comments (0)