CREATE OR REPLACE PROCEDURE 
    WithSalary( IN X INT )
BEGIN
    SELECT
        COUNT(*) AS with_salary
    FROM
        vacancy
    WHERE
        start_date >= DATE_SUB( NOW(), INTERVAL X WEEK )
    AND                                                  
        salary IS NOT NULL                                              
    AND
        salary > 0
    ;
END

CREATE OR REPLACE PROCEDURE 
    Total( IN X INT )
BEGIN
    SELECT 
       COUNT(*) AS total
    FROM
        vacancy                                          
    WHERE
        start_date >= DATE_SUB( NOW(), INTERVAL X WEEK )
    ;
END



