Create stored procedure for revenue