diff --git a/src/sql/0-run-first/contributions.sql b/src/sql/0-run-first/contributions.sql index 5a2af0e..c8f4cbe 100644 --- a/src/sql/0-run-first/contributions.sql +++ b/src/sql/0-run-first/contributions.sql @@ -14,7 +14,7 @@ FROM users INNER JOIN all_projects ap on project_lifecycle.project_number = ap.refnum INNER JOIN contacts on ap.contact_fkey = contacts.pkey INNER JOIN clients on contacts.cl_fkey = clients.pkey -WHERE engineer_contributions.`Project Number` in (SELECT DISTINCT `Project Number` from engineer_contributions) +WHERE engineer_contributions.`Project Number` AND project_lifecycle.new_value IN ('+SEALED') AND users.priv & POW(2, 25) > 0;