select bug_id from bt_bugs where bug_number = :one_bug_number and project_id = :package_id select patch_id from bt_patches where patch_number = :patch_number and project_id = :package_id select summary from bt_patches where patch_number = :patch_number and project_id = :package_id select component_id from bt_patches where patch_number = :patch_number and project_id = :package_id select count(*) from bt_bugs, workflow_cases cas, workflow_case_fsm cfsm where $sql_where_clause