Question: CREATE PROCEDURE average_age AS SELECT AVG(age) FROM PASSENGERS GO; Modify the procedure in the code above to accept destination and total number of visits as

CREATE PROCEDURE average_age

AS

SELECT AVG(age)

FROM PASSENGERS

GO;

Modify the procedure in the code above to accept destination and total number of visits as input. The procedure must check if Germany was visited more than ten times, and then display the minimum age of the passengers. If Germany was visited less than ten times, display the maximum age of the passengers. Create a statement to invoke the procedure.

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!