I want to get the information about the users in my database.
This is what I have:
Table:
create table Users(
userID int CHECK (userID > 0),
email varchar2(30) NOT NULL,
age varchar2(30) NOT NULL,
numberBookedSoFar int,
primary key(userID)
);
Procedure:
CREATE or REPLACE PROCEDURE user_info() AS
BEGIN
SELECT age, COUNT(userid) AS numberofusers,
AVG(numberbookedsofar) AS avgbooked
FROM users
GROUP BY age;
END;
But, nothing is happening.