A temporary table 

CREATE TEMPORARY TABLE current_staff AS
    SELECT *
    FROM person
    WHERE active
    AND (
        leaving_date IS NULL
        OR leaving_date >= CURRENT_DATE
    )
    AND (start_date <= CURRENT_DATE);

SELECT count(*) FROM current_staff;