select project_id from bt_projects select wc.case_id from workflow_cases wc, bt_bugs b where wc.object_id = b.bug_id