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
Get step-by-step solutions from verified subject matter experts
