select folder_id from cr_folders where label = 'Course Catalog' select item_id from cr_revisions where revision_id = :revision_id select creation_user from acs_objects where object_id = :object_id update cr_items set live_revision = :revision_id where item_id = ( select item_id from cr_revisions where revision_id = :revision_id ) select course_id from course_catalog where course_key = :name select count (rel_id) from acs_rels where object_id_one = :course_id select rel_id from acs_rels where object_id_one = :object_one and object_id_two = :object_two select count (rel_id) from acs_rels where rel_type = 'course_catalog_com_rel' and object_id_two = :community_id select rel_id from acs_rels where (rel_type = 'course_catalog_class_rel' or rel_type = 'course_catalog_com_rel') and object_id_one = :course_id delete from course_catalog where course_id = :course_id delete from cr_revisions where revision_id = :course_id select 1 from cr_items where live_revision = :revision_id select 1 from cr_items where latest_revision = :revision_id select ci.item_id as assessment_id from cr_folders cf, cr_items ci, cr_revisions cr, as_assessments a where cr.revision_id = ci.latest_revision and a.assessment_id = cr.revision_id and ci.parent_id = cf.folder_id and cf.package_id = :asm_package_id select ci.item_id as assessment_id from cr_folders cf, cr_items ci, cr_revisions cr, as_assessments a where cr.revision_id = ci.latest_revision and a.assessment_id = cr.revision_id and ci.parent_id = cf.folder_id and cf.package_id = :asm_package_id